From fa3d264b0bd70afa15a22811be369dc8b65267e6 Mon Sep 17 00:00:00 2001 From: Bernd Weimer Date: Thu, 15 May 2014 15:57:01 +0200 Subject: 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 --- tests/auto/testlib/selftests/tst_selftests.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3