Added check to qtemporarydir unittest to check and skip if root
- nonWritableCurrentDir() function not valid test when run as root on unix platform so add skip. Change-Id: I0c5ee685d3bdeaf3d5d2e0bb93ba7d7796fd1028 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
parent
74bf87aa4b
commit
60f89f412d
@ -228,6 +228,9 @@ void tst_QTemporaryDir::autoRemove()
|
||||
void tst_QTemporaryDir::nonWritableCurrentDir()
|
||||
{
|
||||
#ifdef Q_OS_UNIX
|
||||
if (::geteuid() == 0)
|
||||
QSKIP("not valid running this test as root");
|
||||
|
||||
struct ChdirOnReturn
|
||||
{
|
||||
ChdirOnReturn(const QString& d) : dir(d) {}
|
||||
|
Loading…
Reference in New Issue
Block a user