From 0ce443691fac1188103e5eaa66be40278d5d5e97 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 11 Feb 2021 10:51:55 +0200 Subject: Move QEMU emulation detector to QTest The emulation detection has been usable only on qtbase tests, move it to QTest so that it can be used in other modules as well. Pick-to: 6.1 Change-Id: I4b2321b7856414d7b1cfd5e6b1405a633c6bb878 Reviewed-by: Edward Welbourne --- tests/auto/corelib/thread/qthread/CMakeLists.txt | 5 ++--- tests/auto/corelib/thread/qthread/tst_qthread.cpp | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/auto/corelib/thread') diff --git a/tests/auto/corelib/thread/qthread/CMakeLists.txt b/tests/auto/corelib/thread/qthread/CMakeLists.txt index b3662f31da..96c649f106 100644 --- a/tests/auto/corelib/thread/qthread/CMakeLists.txt +++ b/tests/auto/corelib/thread/qthread/CMakeLists.txt @@ -6,10 +6,9 @@ qt_internal_add_test(tst_qthread SOURCES - ../../../../shared/emulationdetector.h tst_qthread.cpp - INCLUDE_DIRECTORIES - ../../../../shared + PUBLIC_LIBRARIES + Qt::TestPrivate ) ## Scopes: diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp index a34129d59a..7e06e7f51f 100644 --- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp +++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp @@ -55,7 +55,7 @@ #include #endif -#include "emulationdetector.h" +#include class tst_QThread : public QObject { @@ -951,7 +951,7 @@ void tst_QThread::adoptMultipleThreadsOverlap() // Disconnects on WinCE void tst_QThread::stressTest() { - if (EmulationDetector::isRunningArmOnX86()) + if (QTestPrivate::isRunningArmOnX86()) QSKIP("Qemu uses too much memory for each thread. Test would run out of memory."); QElapsedTimer timer; -- cgit v1.2.3