Commit 2663f5d3 authored by Christian Stenger's avatar Christian Stenger

Squish: Improve cmake test

Change-Id: If6cdae302f29cbfe50eb1355b610e8f120bf7681
Reviewed-by: default avatarBill King <bill.king@nokia.com>
parent 292d7088
......@@ -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'}
......
......@@ -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(" ", "_")
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment