Commit 36573eda authored by Robert Loehning's avatar Robert Loehning Committed by Robert Löhning
Browse files

Squish: Running tst_build_new_project on more build configs



Change-Id: I413f5393bb8d56842d8132e26123ebe21d89c57a
Reviewed-by: default avatarChristian Stenger <christian.stenger@nokia.com>
Reviewed-by: default avatarBill King <bill.king@nokia.com>
parent c51a128e
...@@ -66,15 +66,24 @@ def __createProjectSetNameAndPath__(path, projectName = None, checks = True): ...@@ -66,15 +66,24 @@ def __createProjectSetNameAndPath__(path, projectName = None, checks = True):
clickButton(waitForObject(":Next_QPushButton")) clickButton(waitForObject(":Next_QPushButton"))
return str(projectName) return str(projectName)
# Selects the Qt versions for a project
# param qtVersion is the name of a Qt version. In the project, build configurations will be
# created for this version. If it is None, all Qt versions will be used
# param checks turns tests in the function on if set to True
def __selectQtVersionDesktop__(qtVersion, checks): def __selectQtVersionDesktop__(qtVersion, checks):
__chooseTargets__() __chooseTargets__()
selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox_2", if qtVersion == None:
"For One Qt Version One Debug And One Release") selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox_2",
ensureChecked(":scrollArea.Use Shadow Building_QCheckBox") "For Each Qt Version One Debug And One Release")
selectFromCombo(":scrollArea.Qt Version:_QComboBox", qtVersion) ensureChecked(":scrollArea.Use Shadow Building_QCheckBox")
if checks: else:
verifyChecked(":scrollArea.Qt 4 for Desktop - (Qt SDK) debug_QCheckBox") selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox_2",
verifyChecked(":scrollArea.Qt 4 for Desktop - (Qt SDK) release_QCheckBox") "For One Qt Version One Debug And One Release")
ensureChecked(":scrollArea.Use Shadow Building_QCheckBox")
selectFromCombo(":scrollArea.Qt Version:_QComboBox", qtVersion)
if checks:
verifyChecked(":scrollArea.Qt 4 for Desktop - (Qt SDK) debug_QCheckBox")
verifyChecked(":scrollArea.Qt 4 for Desktop - (Qt SDK) release_QCheckBox")
clickButton(waitForObject(":Next_QPushButton")) clickButton(waitForObject(":Next_QPushButton"))
def __createProjectHandleLastPage__(expectedFiles = None): def __createProjectHandleLastPage__(expectedFiles = None):
...@@ -95,7 +104,13 @@ def __verifyFileCreation__(path, expectedFiles): ...@@ -95,7 +104,13 @@ def __verifyFileCreation__(path, expectedFiles):
filename = os.path.join(path, filename) filename = os.path.join(path, filename)
test.verify(os.path.exists(filename), "Checking if '" + filename + "' was created") test.verify(os.path.exists(filename), "Checking if '" + filename + "' was created")
def createProject_Qt_GUI(path, projectName, qtVersion, checks): # Creates a Qt GUI project
# param path specifies where to create the project
# param projectName is the name for the new project
# param qtVersion is the name of a Qt version. In the project, build configurations will be
# created for this version. If it is None, all Qt versions will be used
# param checks turns tests in the function on if set to True
def createProject_Qt_GUI(path, projectName, qtVersion = None, checks = True):
__createProjectSelectType__("Other Qt Project", "Qt Gui Application") __createProjectSelectType__("Other Qt Project", "Qt Gui Application")
__createProjectSetNameAndPath__(path, projectName, checks) __createProjectSetNameAndPath__(path, projectName, checks)
__selectQtVersionDesktop__(qtVersion, checks) __selectQtVersionDesktop__(qtVersion, checks)
......
...@@ -5,8 +5,11 @@ project = "SquishProject" ...@@ -5,8 +5,11 @@ project = "SquishProject"
def main(): def main():
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)
createProject_Qt_GUI(projectsPath, project, defaultQtVersion, True) createProject_Qt_GUI(projectsPath, project)
runAndCloseApp() for config in iterateBuildConfigs(1, 0):
selectBuildConfig(1, 0, config)
test.log("Testing build configuration: " + config)
runAndCloseApp()
sendEvent("QCloseEvent", waitForObject(":Qt Creator_Core::Internal::MainWindow")) sendEvent("QCloseEvent", waitForObject(":Qt Creator_Core::Internal::MainWindow"))
waitForCleanShutdown() waitForCleanShutdown()
......
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