diff options
author | Robert Loehning <robert.loehning@digia.com> | 2013-04-25 19:08:55 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@digia.com> | 2013-05-02 10:13:19 +0200 |
commit | c8984dc58adb48ce82a2794fe713d945f1d4f3ec (patch) | |
tree | 704f87520a13215d1d5acbedcd0519cc9b24acc7 /tests/system | |
parent | 3245b706bcd173aed34a981b592de0019e25c7d5 (diff) | |
download | qt-creator-c8984dc58adb48ce82a2794fe713d945f1d4f3ec.tar.gz |
Squish: Using progressBarWait() instead of waitForSignal()
Change-Id: Ia87569c080f3b54dd8f78b023408de76eb3c574c
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'tests/system')
-rw-r--r-- | tests/system/shared/build_utils.py | 3 | ||||
-rw-r--r-- | tests/system/shared/project.py | 6 | ||||
-rw-r--r-- | tests/system/shared/utils.py | 4 | ||||
-rw-r--r-- | tests/system/suite_CSUP/tst_CSUP04/test.py | 2 | ||||
-rw-r--r-- | tests/system/suite_CSUP/tst_CSUP05/test.py | 2 | ||||
-rw-r--r-- | tests/system/suite_WELP/tst_WELP02/test.py | 6 | ||||
-rw-r--r-- | tests/system/suite_editors/tst_basic_cpp_support/test.py | 3 | ||||
-rw-r--r-- | tests/system/suite_general/tst_build_speedcrunch/test.py | 2 | ||||
-rw-r--r-- | tests/system/suite_general/tst_cmake_speedcrunch/test.py | 2 | ||||
-rw-r--r-- | tests/system/suite_general/tst_openqt_creator/test.py | 4 | ||||
-rw-r--r-- | tests/system/suite_qtquick/tst_qtquick_creation4/test.py | 2 |
11 files changed, 16 insertions, 20 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index 491c4bb7df..859131d803 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -163,8 +163,7 @@ def selectBuildConfig(targetCount, currentTarget, configName): switchViewTo(ViewConstants.PROJECTS) switchToBuildOrRunSettingsFor(targetCount, currentTarget, ProjectSettings.BUILD) if selectFromCombo(":scrollArea.Edit build configuration:_QComboBox", configName): - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", - "sourceFilesRefreshed(QStringList)") + progressBarWait(30000) return getQtInformationForBuildSettings(targetCount, True, ViewConstants.EDIT) # This will not trigger a rebuild. If needed, caller has to do this. diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 95ea498865..99fa6c76fe 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -175,7 +175,7 @@ def createProject_Qt_GUI(path, projectName, checks = True): expectedFiles.extend(__sortFilenamesOSDependent__(["main.cpp", cpp_file, h_file, ui_file, pro_file])) __createProjectHandleLastPage__(expectedFiles) - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 20000) + progressBarWait(20000) __verifyFileCreation__(path, expectedFiles) return checkedTargets @@ -199,7 +199,7 @@ def createProject_Qt_Console(path, projectName, checks = True): expectedFiles.extend(__sortFilenamesOSDependent__([cpp_file, pro_file])) __createProjectHandleLastPage__(expectedFiles) - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 10000) + progressBarWait(10000) __verifyFileCreation__(path, expectedFiles) return checkedTargets @@ -224,7 +224,7 @@ def createNewQtQuickApplication(workingDir, projectName = None, templateFile = N clickButton(nextButton) __createProjectHandleLastPage__() - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 10000) + progressBarWait(10000) return checkedTargets, projectName def createNewQtQuickUI(workingDir): diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 4bb0e36ef8..b1f55dc5a6 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -609,9 +609,9 @@ def checkIfObjectExists(name, shouldExist = True, timeout = 3000, verboseOnFail return result # wait for progress bar(s) to appear and disappear -def progressBarWait(): +def progressBarWait(timeout=60000): checkIfObjectExists("{type='Core::Internal::ProgressBar' unnamed='1'}", True, 2000) - checkIfObjectExists("{type='Core::Internal::ProgressBar' unnamed='1'}", False, 60000) + checkIfObjectExists("{type='Core::Internal::ProgressBar' unnamed='1'}", False, timeout) def readFile(filename): f = open(filename, "r") diff --git a/tests/system/suite_CSUP/tst_CSUP04/test.py b/tests/system/suite_CSUP/tst_CSUP04/test.py index 405c595518..05c7d5e4a6 100644 --- a/tests/system/suite_CSUP/tst_CSUP04/test.py +++ b/tests/system/suite_CSUP/tst_CSUP04/test.py @@ -19,7 +19,7 @@ def main(): openQmakeProject(examplePath) installLazySignalHandler("{type='Core::FutureProgress' unnamed='1'}", "finished()", "__handleFutureProgress__") # wait for parsing to complete - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") + progressBarWait(30000) # open .cpp file in editor if not openDocument("propertyanimation.Sources.main\\.cpp"): test.fatal("Could not open main.cpp") diff --git a/tests/system/suite_CSUP/tst_CSUP05/test.py b/tests/system/suite_CSUP/tst_CSUP05/test.py index 97dec22d1e..174759e7da 100644 --- a/tests/system/suite_CSUP/tst_CSUP05/test.py +++ b/tests/system/suite_CSUP/tst_CSUP05/test.py @@ -17,7 +17,7 @@ def main(): # open example project openQmakeProject(examplePath) # wait for parsing to complete - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") + progressBarWait(30000) # open .cpp file in editor if not openDocument("propertyanimation.Sources.main\\.cpp"): test.fatal("Could not open main.cpp") diff --git a/tests/system/suite_WELP/tst_WELP02/test.py b/tests/system/suite_WELP/tst_WELP02/test.py index a68f755486..d8b359b070 100644 --- a/tests/system/suite_WELP/tst_WELP02/test.py +++ b/tests/system/suite_WELP/tst_WELP02/test.py @@ -28,8 +28,7 @@ def main(): # select "Create Project" and try to create a new project. # create Qt Quick application from "Welcome" page -> "Develop" tab createNewQtQuickApplication(tempDir(), "SampleApp", fromWelcome = True) - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", - "sourceFilesRefreshed(QStringList)") + progressBarWait(30000) test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'" " text~='SampleApp( \(.*\))?' type='QModelIndex'}"), "Verifying: The project is opened in 'Edit' mode after configuring.") @@ -42,8 +41,7 @@ def main(): examplePath = os.path.join(prepareTemplate(sourceExample), "propertyanimation.pro") # open example project from "Welcome" page -> "Develop" tab openQmakeProject(examplePath, fromWelcome = True) - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", - "sourceFilesRefreshed(QStringList)") + progressBarWait(30000) test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'" " text~='propertyanimation( \(.*\))?' type='QModelIndex'}"), "Verifying: The project is opened in 'Edit' mode after configuring.") diff --git a/tests/system/suite_editors/tst_basic_cpp_support/test.py b/tests/system/suite_editors/tst_basic_cpp_support/test.py index c48332e0e6..a19b28561e 100644 --- a/tests/system/suite_editors/tst_basic_cpp_support/test.py +++ b/tests/system/suite_editors/tst_basic_cpp_support/test.py @@ -19,9 +19,8 @@ def main(): overrideInstallLazySignalHandler() installLazySignalHandler(":Qt Creator_CppEditor::Internal::CPPEditorWidget", "textChanged()", "__handleTextChanged__") - prepareForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") openQmakeProject(proFile) - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 20000) + progressBarWait(20000) selectFromLocator("dummy.cpp") ## Waiting for a solution from Froglogic to make the below work. diff --git a/tests/system/suite_general/tst_build_speedcrunch/test.py b/tests/system/suite_general/tst_build_speedcrunch/test.py index 9925be73db..65b915023b 100644 --- a/tests/system/suite_general/tst_build_speedcrunch/test.py +++ b/tests/system/suite_general/tst_build_speedcrunch/test.py @@ -21,7 +21,7 @@ def main(): if platform.system() in ('Windows', 'Microsoft'): suitableKits |= Targets.DESKTOP_474_MSVC2008 checkedTargets = openQmakeProject(SpeedCrunchPath, suitableKits) - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") + progressBarWait(30000) fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton") diff --git a/tests/system/suite_general/tst_cmake_speedcrunch/test.py b/tests/system/suite_general/tst_cmake_speedcrunch/test.py index feac26c9e3..1521611fff 100644 --- a/tests/system/suite_general/tst_cmake_speedcrunch/test.py +++ b/tests/system/suite_general/tst_cmake_speedcrunch/test.py @@ -21,7 +21,7 @@ def main(): test.fatal("Could not open/create cmake project - leaving test") invokeMenuItem("File", "Exit") return - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") + progressBarWait(30000) # Invoke a rebuild of the application invokeMenuItem("Build", "Rebuild All") diff --git a/tests/system/suite_general/tst_openqt_creator/test.py b/tests/system/suite_general/tst_openqt_creator/test.py index 7993d4b30e..b6475fd6d9 100644 --- a/tests/system/suite_general/tst_openqt_creator/test.py +++ b/tests/system/suite_general/tst_openqt_creator/test.py @@ -12,10 +12,10 @@ def main(): openQmakeProject(pathSpeedcrunch) # Wait for parsing to complete - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") + progressBarWait(30000) openQmakeProject(pathCreator) # Wait for parsing to complete - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 300000) + progressBarWait(300000) naviTreeView = "{column='0' container=':Qt Creator_Utils::NavigationTreeView' text~='%s' type='QModelIndex'}" compareProjectTree(naviTreeView % "speedcrunch( \(\S+\))?", "projecttree_speedcrunch.tsv") diff --git a/tests/system/suite_qtquick/tst_qtquick_creation4/test.py b/tests/system/suite_qtquick/tst_qtquick_creation4/test.py index 3908ec9c42..d8ccecd7cb 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation4/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation4/test.py @@ -7,7 +7,7 @@ def main(): # using a temporary directory won't mess up a potentially existing createNewQmlExtension(tempDir()) # wait for parsing to complete - waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") + progressBarWait(30000) test.log("Building project") invokeMenuItem("Build","Build All") waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)") |