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:
parent
f7559904d0
commit
413798cc01
@ -18,6 +18,7 @@ class tst_QtConcurrentRun: public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private slots:
|
private slots:
|
||||||
|
void initTestCase();
|
||||||
void runLightFunction();
|
void runLightFunction();
|
||||||
void runHeavyFunction();
|
void runHeavyFunction();
|
||||||
void returnValue();
|
void returnValue();
|
||||||
@ -85,6 +86,13 @@ void heavy()
|
|||||||
qDebug("done function");
|
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()
|
void tst_QtConcurrentRun::runLightFunction()
|
||||||
{
|
{
|
||||||
qDebug("starting function");
|
qDebug("starting function");
|
||||||
@ -701,9 +709,6 @@ static void runFunction()
|
|||||||
|
|
||||||
void tst_QtConcurrentRun::pollForIsFinished()
|
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());
|
const int numThreads = std::max(4, 2 * QThread::idealThreadCount());
|
||||||
QThreadPool::globalInstance()->setMaxThreadCount(numThreads);
|
QThreadPool::globalInstance()->setMaxThreadCount(numThreads);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user