diff options
author | Robert Loehning <robert.loehning@qt.io> | 2019-10-29 13:34:55 +0100 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2019-11-15 12:46:13 +0000 |
commit | 775c78eca8e5272c8dad2a76a3eb0023347f5e38 (patch) | |
tree | ab59e762a39bf9f466aa71973f4bc1d919029d5f /tests/system | |
parent | 61fa3e87046694b3d4c772a49ff341b655c1e796 (diff) | |
download | qt-creator-775c78eca8e5272c8dad2a76a3eb0023347f5e38.tar.gz |
Squish: Stabilize selectBuildConfig(...)
Change-Id: Iba111e8cbbe652dd488b4dc91c58b92f53eccba3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests/system')
-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) |