tst_selftests: deduplicate the Unix/Linux conditions

Amends 118f2210c6. That commit added

 #ifdef Q_OS_UNIX
     if (test == "assert"
         || test == "crashes"
         || test == "failfetchtype"
         || test == "faildatatype")
     return; // Outputs "Received signal 6 (SIGABRT)"
 #endif

Which duplicated 4 out of the 5 tests in the block:

 #ifdef Q_OS_LINUX
    // QEMU outputs to stderr about uncaught signals
    if (QTestPrivate::isRunningArmOnX86() &&
        (test == "assert"
         || test == "crashes"
         || test == "faildatatype"
         || test == "failfetchtype"
         || test == "silent"
        ))
        return;
 #endif

But as Linux is Unix, we never got to that second block for those 4
tests.

Pick-to: 6.6
Change-Id: I2b24e1d3cad44897906efffd177fb4b5507d190a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Thiago Macieira 2023-08-28 17:57:55 -07:00
parent fcb548878b
commit f1ba2b9f44

View File

@ -783,15 +783,10 @@ void checkErrorOutput(const QString &test, const QByteArray &errorOutput)
#endif #endif
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
// QEMU outputs to stderr about uncaught signals if (test == "silent") {
if (QTestPrivate::isRunningArmOnX86() && if (QTestPrivate::isRunningArmOnX86())
(test == "assert" return; // QEMU outputs to stderr about uncaught signals
|| test == "crashes" }
|| test == "faildatatype"
|| test == "failfetchtype"
|| test == "silent"
))
return;
#endif #endif
INFO(errorOutput.toStdString()); INFO(errorOutput.toStdString());