summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-06-30 16:17:15 +0300
committerSimon Hausmann <simon.hausmann@qt.io>2017-07-02 15:58:40 +0000
commitd23e18189c371eca5725e2ff394d720724625d2c (patch)
tree781f4dc50bde8cef6a5f567fd7fc9c2a412fc661
parent23e2cc38ffcc725e8b5a4ac76941c278af86e388 (diff)
Skip QThread stress test on Qemu
Qemu uses some memory for each generated thread. This test creates > 80000 threads and consumes about 10Gb of memory which is too heavy for a VM. Task-number: QTBUG-59966 Change-Id: I1bb8a0d7955778f5201948b41befcb9f1f391514 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--tests/auto/corelib/thread/qthread/qthread.pro3
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp5
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/corelib/thread/qthread/qthread.pro b/tests/auto/corelib/thread/qthread/qthread.pro
index 18d867ecef..e0ef506d2c 100644
--- a/tests/auto/corelib/thread/qthread/qthread.pro
+++ b/tests/auto/corelib/thread/qthread/qthread.pro
@@ -2,3 +2,6 @@ CONFIG += testcase
TARGET = tst_qthread
QT = core testlib
SOURCES = tst_qthread.cpp
+
+INCLUDEPATH += ../../../../shared/
+HEADERS += ../../../../shared/emulationdetector.h
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index 0efbc5d01e..5c8522a313 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -47,6 +47,8 @@
#endif
#endif
+#include "emulationdetector.h"
+
class tst_QThread : public QObject
{
Q_OBJECT
@@ -937,6 +939,9 @@ void tst_QThread::adoptMultipleThreadsOverlap()
// Disconnects on WinCE
void tst_QThread::stressTest()
{
+ if (EmulationDetector::isRunningArmOnX86())
+ QSKIP("Qemu uses too much memory for each thread. Test would run out of memory.");
+
QTime t;
t.start();
while (t.elapsed() < one_minute) {