QTestLib: basic WebAssembly support

Disable the crash signal handler. This makes it possible
to run auto-tests in the browser.

Long-running tests may cause the browser to interrupt
or display the “a web page is slowing down your computer”
message, or not produce any console output while the
test is running.

Change-Id: Ifd53b744bd3652abfb466b78992ce2371eca2536
Task-number: QTBUG-68504
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
Morten Johan Sørvig 2019-08-13 14:52:56 +02:00 committed by Lorn Potter
parent 4b346aedf8
commit 9cb823cd0f

View File

@ -1497,7 +1497,7 @@ void TestMethods::invokeTests(QObject *testObject) const
QTestResult::setCurrentTestFunction(nullptr);
}
#if defined(Q_OS_UNIX)
#if defined(Q_OS_UNIX) && !defined(Q_OS_WASM)
class FatalSignalHandler
{
public:
@ -1897,7 +1897,7 @@ int QTest::qRun()
} else
#endif
{
#if defined(Q_OS_UNIX)
#if defined(Q_OS_UNIX) && !defined(Q_OS_WASM)
QScopedPointer<FatalSignalHandler> handler;
if (!noCrashHandler)
handler.reset(new FatalSignalHandler);