diff options
-rw-r--r-- | tests/system/shared/build_utils.py | 2 | ||||
-rw-r--r-- | tests/system/shared/project.py | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index db1b11c6c4..6e03a0735b 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -155,7 +155,7 @@ def selectBuildConfig(wantedKit, configName, afterSwitchTo=ViewConstants.EDIT): switchViewTo(ViewConstants.PROJECTS) if any((switchToBuildOrRunSettingsFor(wantedKit, ProjectSettings.BUILD), selectFromCombo(":scrollArea.Edit build configuration:_QComboBox", configName))): - progressBarWait(30000) + waitForProjectParsing(5000, 30000, 0) 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 4ad7889cb7..fc2f9f887e 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -673,11 +673,15 @@ def addCPlusPlusFile(name, template, projectName, forceOverwrite=False, addToVCS clickButton("{text='%s' type='QPushButton' unnamed='1' visible='1' window=%s}" % (buttonToClick, overwriteDialog)) -# if one of the parameters is set to 0 or below the respective parsing won't be waited for -def waitForProjectParsing(projectParsingTimeout=10000, codemodelParsingTimeout=10000): - if projectParsingTimeout > 0: - runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton') - # Wait for parsing to complete - waitFor("runButton.enabled", projectParsingTimeout) +# if one of the parameters is set to 0 the function will not wait in this step +# beginParsingTimeout milliseconds to wait for parsing to begin +# projectParsingTimeout milliseconds to wait for project parsing +# codemodelParsingTimeout milliseconds to wait for C++ parsing +def waitForProjectParsing(beginParsingTimeout=0, projectParsingTimeout=10000, + codemodelParsingTimeout=10000): + runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton') + waitFor("not runButton.enabled", beginParsingTimeout) + # Wait for parsing to complete + waitFor("runButton.enabled", projectParsingTimeout) if codemodelParsingTimeout > 0: progressBarWait(codemodelParsingTimeout) |