Added check to qtemporaryfile unittest if run as root user

- nonWritableCurrentDir() function not valid test if run as root
  so added skip.

Change-Id: I772e8356e6f798f5acdf7688c55f3241ad012a43
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:
Kurt Korbatits 2012-01-17 09:49:15 +10:00 committed by Qt by Nokia
parent 60f89f412d
commit 50248b1dac

View File

@ -256,6 +256,9 @@ void tst_QTemporaryFile::autoRemove()
void tst_QTemporaryFile::nonWritableCurrentDir()
{
#ifdef Q_OS_UNIX
if (::geteuid() == 0)
QSKIP("not valid running this test as root");
struct ChdirOnReturn
{
ChdirOnReturn(const QString& d) : dir(d) {}