From 3dd8798d8481102f0a575c716bfdf6426765d78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Thu, 26 Sep 2024 11:22:45 +0200 Subject: [PATCH] SquishTests: Fix waiting for project parsing The run button isn't being disabled after changes to the project anymore. Replaced this condition with waiting for progress bars in the only place where that mattered. Change-Id: Ib73c2ec67479af9c7d45d30dcfdd4ed81c792b9b Reviewed-by: Christian Stenger --- tests/system/shared/build_utils.py | 2 +- tests/system/shared/project.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index fb28c8d8569..4d42f8db80e 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -121,7 +121,7 @@ def selectBuildConfig(wantedKit, configName, afterSwitchTo=ViewConstants.EDIT): switchViewTo(ViewConstants.PROJECTS) if any((switchToBuildOrRunSettingsFor(wantedKit, ProjectSettings.BUILD), selectFromCombo(":scrollArea.Edit build configuration:_QComboBox", configName))): - waitForProjectParsing(5000, 30000, 0) + progressBarWait(30000) if afterSwitchTo: if ViewConstants.FIRST_AVAILABLE <= afterSwitchTo <= ViewConstants.LAST_AVAILABLE: switchViewTo(afterSwitchTo) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index b87920b4f76..86692c3410c 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -694,7 +694,11 @@ def addCPlusPlusFile(name, template, projectName, forceOverwrite=False, addToVCS def waitForProjectParsing(beginParsingTimeout=0, projectParsingTimeout=10000, codemodelParsingTimeout=10000): runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton') - waitFor("not runButton.enabled", beginParsingTimeout) + if beginParsingTimeout > 0: + # currently unused + test.warning("Waiting for the runButton to become disabled is probably futile.", + "The button isn't disabled during project parsing anymore.") + waitFor("not runButton.enabled", beginParsingTimeout) # Wait for parsing to complete waitFor("runButton.enabled", projectParsingTimeout) if codemodelParsingTimeout > 0: