Skip tst_qconcurrentrun completely if running under an emulator

Task-number: QTBUG-106906
Pick-to: 6.5 6.4
Change-Id: I1836f5be42528c71470c2cd6509f7125feb47691
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Ville Voutilainen 2022-12-18 16:11:05 +02:00 committed by Volker Hilsheimer
parent f7559904d0
commit 413798cc01

View File

@ -18,6 +18,7 @@ class tst_QtConcurrentRun: public QObject
{
Q_OBJECT
private slots:
void initTestCase();
void runLightFunction();
void runHeavyFunction();
void returnValue();
@ -85,6 +86,13 @@ void heavy()
qDebug("done function");
}
void tst_QtConcurrentRun::initTestCase()
{
// proxy check for QEMU; catches slightly more though
if (QTestPrivate::isRunningArmOnX86())
QSKIP("Runs into spurious crashes on QEMU -- QTBUG-106906");
}
void tst_QtConcurrentRun::runLightFunction()
{
qDebug("starting function");
@ -701,9 +709,6 @@ static void runFunction()
void tst_QtConcurrentRun::pollForIsFinished()
{
// proxy check for QEMU; catches slightyl more though
if (QTestPrivate::isRunningArmOnX86())
QSKIP("Runs into spurious crashes on QEMU -- QTBUG-106906");
const int numThreads = std::max(4, 2 * QThread::idealThreadCount());
QThreadPool::globalInstance()->setMaxThreadCount(numThreads);