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>
This commit is contained in:
parent
23e2cc38ff
commit
d23e18189c
@ -2,3 +2,6 @@ CONFIG += testcase
|
|||||||
TARGET = tst_qthread
|
TARGET = tst_qthread
|
||||||
QT = core testlib
|
QT = core testlib
|
||||||
SOURCES = tst_qthread.cpp
|
SOURCES = tst_qthread.cpp
|
||||||
|
|
||||||
|
INCLUDEPATH += ../../../../shared/
|
||||||
|
HEADERS += ../../../../shared/emulationdetector.h
|
||||||
|
@ -47,6 +47,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "emulationdetector.h"
|
||||||
|
|
||||||
class tst_QThread : public QObject
|
class tst_QThread : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -937,6 +939,9 @@ void tst_QThread::adoptMultipleThreadsOverlap()
|
|||||||
// Disconnects on WinCE
|
// Disconnects on WinCE
|
||||||
void tst_QThread::stressTest()
|
void tst_QThread::stressTest()
|
||||||
{
|
{
|
||||||
|
if (EmulationDetector::isRunningArmOnX86())
|
||||||
|
QSKIP("Qemu uses too much memory for each thread. Test would run out of memory.");
|
||||||
|
|
||||||
QTime t;
|
QTime t;
|
||||||
t.start();
|
t.start();
|
||||||
while (t.elapsed() < one_minute) {
|
while (t.elapsed() < one_minute) {
|
||||||
|
Loading…
Reference in New Issue
Block a user