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 <christian.stenger@qt.io>
This commit is contained in:
Robert Löhning
2024-09-26 11:22:45 +02:00
parent 112e3f4cba
commit 3dd8798d84
2 changed files with 6 additions and 2 deletions

View File

@@ -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)

View File

@@ -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: