summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/tst_selftests.cpp
diff options
context:
space:
mode:
authorBernd Weimer <bweimer@blackberry.com>2014-05-15 15:57:01 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-16 10:20:34 +0200
commitfa3d264b0bd70afa15a22811be369dc8b65267e6 (patch)
tree9a7652a6603fed1e549de256b363e900fe60423b /tests/auto/testlib/selftests/tst_selftests.cpp
parent72558e810d9b3493dabfc936fa6c8bf3c3f3b49c (diff)
QNX: Fix tst_selftest
GRAPHICS_ROOT and TZ environment variables are needed in child processes in order to successfully run the auto test selftests. Change-Id: I7befabd535b4c47b1e75acbe3d6158d0d9b811b3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/testlib/selftests/tst_selftests.cpp')
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 8167a96eaa..9082561dc9 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -526,9 +526,11 @@ static QProcessEnvironment processEnvironment()
const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment();
foreach (const QString &key, systemEnvironment.keys()) {
const bool useVariable = key == QLatin1String("PATH") || key == QLatin1String("QT_QPA_PLATFORM")
-#ifdef Q_OS_UNIX
+#if defined(Q_OS_QNX)
+ || key == QLatin1String("GRAPHICS_ROOT") || key == QLatin1String("TZ")
+#elif defined(Q_OS_UNIX)
|| key == QLatin1String("HOME") || key == QLatin1String("USER") // Required for X11 on openSUSE
-# ifndef Q_OS_MAC
+# if !defined(Q_OS_MAC)
|| key == QLatin1String("DISPLAY") || key == QLatin1String("XAUTHLOCALHOSTNAME")
|| key.startsWith(QLatin1String("XDG_"))
# endif // !Q_OS_MAC