summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@nokia.com>2012-01-24 11:59:54 +0100
committerChristian Stenger <christian.stenger@nokia.com>2012-01-24 12:53:05 +0100
commit2663f5d34ecd51015e49df706e1841db4c3aa606 (patch)
treecfc6612aae6f8f875d80f712815bd51fe06bbe04
parent292d70889557c6288071cded32e177852877a40d (diff)
downloadqt-creator-2663f5d34ecd51015e49df706e1841db4c3aa606.tar.gz
Squish: Improve cmake test
Change-Id: If6cdae302f29cbfe50eb1355b610e8f120bf7681 Reviewed-by: Bill King <bill.king@nokia.com>
-rw-r--r--tests/system/objects.map1
-rw-r--r--tests/system/shared/project.py11
-rw-r--r--tests/system/suite_general/tst_cmake_speedcrunch/test.py15
3 files changed, 22 insertions, 5 deletions
diff --git a/tests/system/objects.map b/tests/system/objects.map
index bb758419ec..563969df75 100644
--- a/tests/system/objects.map
+++ b/tests/system/objects.map
@@ -5,6 +5,7 @@
:*Qt Creator_Core::Internal::FancyToolButton {occurrence='3' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator_Utils::FilterLineEdit {type='Utils::FilterLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator_Utils::IconButton {occurrence='4' type='Utils::IconButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
+:CMake Wizard.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
:CMake Wizard.Finish_QPushButton {text~='(Finish|Done)' type='QPushButton' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
:CMake Wizard.Generator:_QLabel {text='Generator:' type='QLabel' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
:CMake Wizard.Next_QPushButton {name='__qt__passive_wizardbutton1' text~='(Next.*|Continue)' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py
index a7990a2b26..830ce8e6d4 100644
--- a/tests/system/shared/project.py
+++ b/tests/system/shared/project.py
@@ -27,7 +27,16 @@ def openCmakeProject(projectPath):
if index != -1:
generatorCombo.setCurrentIndex(index)
clickButton(waitForObject(":CMake Wizard.Run CMake_QPushButton", 20000))
- clickButton(waitForObject(":CMake Wizard.Finish_QPushButton", 60000))
+ try:
+ clickButton(waitForObject(":CMake Wizard.Finish_QPushButton", 60000))
+ except LookupError:
+ cmakeOutput = waitForObject("{type='QPlainTextEdit' unnamed='1' visible='1' "
+ "window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}")
+ test.warning("Error while executing cmake - see details for cmake output.",
+ str(cmakeOutput.plainText))
+ clickButton(waitForObject(":CMake Wizard.Cancel_QPushButton"))
+ return False
+ return True
def shadowBuildDir(path, project, qtVersion, debugVersion):
qtVersion = qtVersion.replace(" ", "_")
diff --git a/tests/system/suite_general/tst_cmake_speedcrunch/test.py b/tests/system/suite_general/tst_cmake_speedcrunch/test.py
index 0307c60ece..89aaa5cc0f 100644
--- a/tests/system/suite_general/tst_cmake_speedcrunch/test.py
+++ b/tests/system/suite_general/tst_cmake_speedcrunch/test.py
@@ -3,16 +3,23 @@ source("../../shared/qtcreator.py")
SpeedCrunchPath = ""
def main():
- if(which("cmake") == None):
- test.fatal("cmake not found")
+ if (which("cmake") == None):
+ test.warning("cmake not found in PATH - needed to run this test")
+ return
+ if (which("qmake") == None):
+ test.warning("qmake not found in PATH - needed to run this test")
return
if not neededFilePresent(SpeedCrunchPath):
return
startApplication("qtcreator" + SettingsPath)
- openCmakeProject(SpeedCrunchPath)
-
+ result = openCmakeProject(SpeedCrunchPath)
+ if not result:
+ test.warning("Could not open/create cmake project - leaving test")
+ invokeMenuItem("File", "Exit")
+ waitForCleanShutdown()
+ return
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
# Test that some of the expected items are in the navigation tree