From 9cb823cd0fe42ea6dabfe5692fec491768950c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 13 Aug 2019 14:52:56 +0200 Subject: [PATCH] QTestLib: basic WebAssembly support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/testlib/qtestcase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 908155e8b5..9ab12c5c68 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -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 handler; if (!noCrashHandler) handler.reset(new FatalSignalHandler);