summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/tst_selftests.cpp
diff options
context:
space:
mode:
authorSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-03-21 12:11:26 +0200
committerSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-03-31 07:09:46 +0000
commita2628375057e7e8b39d2cf3a130cc9d7b1f56fb0 (patch)
tree0470cf5bb3c453ec73b7fd044277294eec3ae3c2 /tests/auto/testlib/selftests/tst_selftests.cpp
parentd33b9774aca23ca2c36f1804cfb5a0ed4bc07eed (diff)
Fix tst_Selftest on QEMU
Two changes are needed to pass tst_Selftest on QEMU 1. Pass QEMU specific env variables to the subtests 2. Ignore output on stderr on some tests when running on QEMU Change-Id: Ie1f722fd183aac5973e87d408005e06cbafcde17 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/tst_selftests.cpp')
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 0c078127b4..e7123fc059 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -36,6 +36,8 @@
#include <private/cycle_p.h>
+#include "emulationdetector.h"
+
struct LoggerSet;
class tst_Selftests: public QObject
@@ -550,6 +552,7 @@ static QProcessEnvironment processEnvironment()
|| key == QLatin1String("GRAPHICS_ROOT") || key == QLatin1String("TZ")
#elif defined(Q_OS_UNIX)
|| key == QLatin1String("HOME") || key == QLatin1String("USER") // Required for X11 on openSUSE
+ || key == QLatin1String("QEMU_SET_ENV") || key == QLatin1String("QEMU_LD_PREFIX") // Required for QEMU
# if !defined(Q_OS_MAC)
|| key == QLatin1String("DISPLAY") || key == QLatin1String("XAUTHLOCALHOSTNAME")
|| key.startsWith(QLatin1String("XDG_"))
@@ -642,6 +645,16 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
&& subdir != QLatin1String("blacklisted") // calls qFatal()
&& subdir != QLatin1String("silent") // calls qFatal()
#endif
+#ifdef Q_OS_LINUX
+ // QEMU outputs to stderr about uncaught signals
+ && (!EmulationDetector::isRunningArmOnX86() ||
+ (subdir != QLatin1String("blacklisted")
+ && subdir != QLatin1String("silent")
+ && subdir != QLatin1String("assert")
+ && subdir != QLatin1String("crashes")
+ )
+ )
+#endif
&& subdir != QLatin1String("benchlibcallgrind"))
QVERIFY2(err.isEmpty(), err.constData());