diff options
author | Robert Griebl <robert.griebl@qt.io> | 2022-05-11 16:50:29 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2022-05-12 11:50:15 +0200 |
commit | 26191b87f30dccff436736c13a62d19a665ae2a0 (patch) | |
tree | 884d78f600fe10b185df146b4bf6071a32dacd12 | |
parent | 1dc6013b9b1a37a761f40677c0968655b3537f04 (diff) | |
download | qtapplicationmanager-26191b87f30dccff436736c13a62d19a665ae2a0.tar.gz |
Disable the Wayland watchdog when running autotests
If tests are running into timeouts in the CI, we most of run into the
Wayland timeout before, messing up the tests' results.
Change-Id: I054f07ff860f77a1e8dfd6a411b049b92555dad0
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
-rw-r--r-- | src/main-lib/configuration.cpp | 7 | ||||
-rw-r--r-- | src/main-lib/configuration.h | 2 | ||||
-rw-r--r-- | src/main-lib/main.cpp | 4 | ||||
-rw-r--r-- | src/main-lib/main.h | 2 | ||||
-rw-r--r-- | src/tools/appman/appman.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qml/windowmapping/tst_windowmapping.qml | 2 |
6 files changed, 14 insertions, 4 deletions
diff --git a/src/main-lib/configuration.cpp b/src/main-lib/configuration.cpp index 635cceea..14b02a36 100644 --- a/src/main-lib/configuration.cpp +++ b/src/main-lib/configuration.cpp @@ -1090,7 +1090,12 @@ bool Configuration::allowUnknownUiClients() const bool Configuration::noUiWatchdog() const { - return value<bool>("no-ui-watchdog", m_data->flags.noUiWatchdog); + return value<bool>("no-ui-watchdog", m_data->flags.noUiWatchdog) || m_forceNoUiWatchdog; +} + +void Configuration::setForceNoUiWatchdog(bool noUiWatchdog) +{ + m_forceNoUiWatchdog = noUiWatchdog; } bool Configuration::noDltLogging() const diff --git a/src/main-lib/configuration.h b/src/main-lib/configuration.h index 926ac01a..a5708b38 100644 --- a/src/main-lib/configuration.h +++ b/src/main-lib/configuration.h @@ -85,6 +85,7 @@ public: bool allowUnsignedPackages() const; bool allowUnknownUiClients() const; bool noUiWatchdog() const; + void setForceNoUiWatchdog(bool noUiWatchdog); bool noDltLogging() const; bool forceSingleProcess() const; bool forceMultiProcess() const; @@ -150,6 +151,7 @@ private: QString m_mainQmlFile; bool m_onlyOnePositionalArgument = false; bool m_forceVerbose = false; + bool m_forceNoUiWatchdog = false; mutable QString m_installationDir; // cached value mutable QString m_documentDir; // cached value }; diff --git a/src/main-lib/main.cpp b/src/main-lib/main.cpp index 93137b8e..68a52357 100644 --- a/src/main-lib/main.cpp +++ b/src/main-lib/main.cpp @@ -640,14 +640,14 @@ void Main::setupWindowTitle(const QString &title, const QString &iconPath) } void Main::setupWindowManager(const QString &waylandSocketName, const QVariantList &waylandExtraSockets, - bool slowAnimations, bool uiWatchdog, bool allowUnknownUiClients) + bool slowAnimations, bool noUiWatchdog, bool allowUnknownUiClients) { QUnifiedTimer::instance()->setSlowModeEnabled(slowAnimations); m_windowManager = WindowManager::createInstance(m_engine, waylandSocketName); m_windowManager->setAllowUnknownUiClients(m_noSecurity || allowUnknownUiClients); m_windowManager->setSlowAnimations(slowAnimations); - m_windowManager->enableWatchdog(!uiWatchdog); + m_windowManager->enableWatchdog(!noUiWatchdog); #if defined(QT_WAYLANDCOMPOSITOR_LIB) connect(&m_windowManager->internalSignals, &WindowManagerInternalSignals::compositorAboutToBeCreated, diff --git a/src/main-lib/main.h b/src/main-lib/main.h index 38fba2e2..b49dfd25 100644 --- a/src/main-lib/main.h +++ b/src/main-lib/main.h @@ -116,7 +116,7 @@ protected: void setupQmlEngine(const QStringList &importPaths, const QString &quickControlsStyle = QString()); void setupWindowTitle(const QString &title, const QString &iconPath); void setupWindowManager(const QString &waylandSocketName, const QVariantList &waylandExtraSockets, - bool slowAnimations, bool uiWatchdog, bool allowUnknownUiClients); + bool slowAnimations, bool noUiWatchdog, bool allowUnknownUiClients); enum SystemProperties { SP_ThirdParty = 0, diff --git a/src/tools/appman/appman.cpp b/src/tools/appman/appman.cpp index 151b91e9..2aabaed5 100644 --- a/src/tools/appman/appman.cpp +++ b/src/tools/appman/appman.cpp @@ -94,6 +94,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) #if defined(AM_TESTRUNNER) TestRunner::initialize(cfg.mainQmlFile(), cfg.testRunnerArguments()); cfg.setForceVerbose(qEnvironmentVariableIsSet("AM_VERBOSE_TEST")); + cfg.setForceNoUiWatchdog(true); // this messes up test results on slow CI systems otherwise #endif a.setup(&cfg); #if defined(AM_TESTRUNNER) diff --git a/tests/auto/qml/windowmapping/tst_windowmapping.qml b/tests/auto/qml/windowmapping/tst_windowmapping.qml index 140665c5..9cb50db5 100644 --- a/tests/auto/qml/windowmapping/tst_windowmapping.qml +++ b/tests/auto/qml/windowmapping/tst_windowmapping.qml @@ -264,6 +264,8 @@ TestCase { if (ApplicationManager.singleProcess) skip("Wayland ping-pong is only supported in multi-process mode"); + else + skip("Wayland ping-pong is disabled in the testrunner due to interferences with other tests"); AmTest.ignoreMessage(AmTest.CriticalMsg, /Stopping application.*because we did not receive a Wayland-Pong/); app.start(); |