Squish: Enable Qt5 for suite_qtquick test cases

Change-Id: I84caf3b4c47badcf444242b6fbc52090ccb5680a
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
Christian Stenger
2013-08-26 11:31:37 +02:00
parent 1cecc5b0f7
commit 8ff61e3036
4 changed files with 105 additions and 86 deletions

View File

@@ -33,32 +33,35 @@ def main():
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError(): if not startedWithoutPluginError():
return return
# using a temporary directory won't mess up a potentially existing for targ, qVer in {Targets.DESKTOP_480_GCC:1, Targets.DESKTOP_501_DEFAULT:2}.items():
workingDir = tempDir() # using a temporary directory won't mess up a potentially existing
checkedTargets, projectName = createNewQtQuickApplication(workingDir, workingDir = tempDir()
targets = Targets.DESKTOP_474_GCC) checkedTargets, projectName = createNewQtQuickApplication(workingDir, targets=targ,
test.log("Building project") qtQuickVersion=qVer)
result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223) test.log("Building project Qt Quick %d Application (%s)"
invokeMenuItem("Build", "Build All") % (qVer, Targets.getStringForTarget(targ)))
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)") result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223)
if not checkCompile(): invokeMenuItem("Build", "Build All")
test.fatal("Compile failed") waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
else: if not checkCompile():
checkLastBuild() test.fatal("Compile failed")
test.log("Running project (includes build)")
if result:
result = addExecutableAsAttachableAUT(projectName, 11223)
allowAppThroughWinFW(workingDir, projectName)
if result:
result = runAndCloseApp(True, projectName, 11223, "subprocessFunction", SubprocessType.QT_QUICK_APPLICATION)
else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_APPLICATION)
removeExecutableAsAttachableAUT(projectName, 11223)
deleteAppFromWinFW(workingDir, projectName)
else: else:
result = runAndCloseApp() checkLastBuild()
if result: test.log("Running project (includes build)")
logApplicationOutput() if result:
result = addExecutableAsAttachableAUT(projectName, 11223)
allowAppThroughWinFW(workingDir, projectName)
if result:
result = runAndCloseApp(True, projectName, 11223, "subprocessFunction", SubprocessType.QT_QUICK_APPLICATION)
else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_APPLICATION)
removeExecutableAsAttachableAUT(projectName, 11223)
deleteAppFromWinFW(workingDir, projectName)
else:
result = runAndCloseApp()
if result:
logApplicationOutput()
invokeMenuItem("File", "Close All Projects and Editors")
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")

View File

@@ -30,40 +30,49 @@
source("../../shared/qtcreator.py") source("../../shared/qtcreator.py")
def main(): def main():
sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/text/textselection") sourceExampleQt4 = os.path.join(sdkPath, "Examples", "4.7", "declarative", "text",
qmlFile = os.path.join("qml", "textselection.qml") "textselection", "qml", "textselection.qml")
if not neededFilePresent(os.path.join(sourceExample, qmlFile)): sourceExampleQt5 = os.path.join(qt5SDKPath(), "examples", "quick", "text", "textselection",
"textselection.qml")
if not neededFilePresent(sourceExampleQt4):
return
if not neededFilePresent(sourceExampleQt5):
return return
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError(): if not startedWithoutPluginError():
return return
# using a temporary directory won't mess up a potentially existing targetsAndQuickVersion = {Targets.DESKTOP_480_GCC:[1, sourceExampleQt4],
workingDir = tempDir() Targets.DESKTOP_501_DEFAULT:[2, sourceExampleQt5]}
checkedTargets, projectName = createNewQtQuickApplication(workingDir, None, for targ, qVerAndEx in targetsAndQuickVersion.items():
os.path.join(prepareTemplate(sourceExample), qmlFile), # using a temporary directory won't mess up a potentially existing
Targets.DESKTOP_474_GCC) workingDir = tempDir()
test.log("Building project") checkedTargets, projectName = createNewQtQuickApplication(workingDir, None,
result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223) qVerAndEx[1],
invokeMenuItem("Build","Build All") targ, qVerAndEx[0])
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)") test.log("Building project Qt Quick %d Application (%s)"
if not checkCompile(): % (qVerAndEx[0], Targets.getStringForTarget(targ)))
test.fatal("Compile failed") result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223)
else: invokeMenuItem("Build","Build All")
checkLastBuild() waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
test.log("Running project (includes build)") if not checkCompile():
if result: test.fatal("Compile failed")
result = addExecutableAsAttachableAUT(projectName, 11223)
allowAppThroughWinFW(workingDir, projectName)
if result:
result = runAndCloseApp(True, projectName, 11223, subprocessFunction, SubprocessType.QT_QUICK_APPLICATION)
else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_APPLICATION)
removeExecutableAsAttachableAUT(projectName, 11223)
deleteAppFromWinFW(workingDir, projectName)
else: else:
result = runAndCloseApp() checkLastBuild()
if result: test.log("Running project (includes build)")
logApplicationOutput() if result:
result = addExecutableAsAttachableAUT(projectName, 11223)
allowAppThroughWinFW(workingDir, projectName)
if result:
result = runAndCloseApp(True, projectName, 11223, subprocessFunction, SubprocessType.QT_QUICK_APPLICATION)
else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_APPLICATION)
removeExecutableAsAttachableAUT(projectName, 11223)
deleteAppFromWinFW(workingDir, projectName)
else:
result = runAndCloseApp()
if result:
logApplicationOutput()
invokeMenuItem("File", "Close All Projects and Editors")
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")
def subprocessFunction(): def subprocessFunction():

View File

@@ -33,29 +33,33 @@ def main():
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError(): if not startedWithoutPluginError():
return return
# using a temporary directory won't mess up a potentially existing for quickVersion in [1, 2]:
workingDir = tempDir() # using a temporary directory won't mess up a potentially existing
projectName = createNewQtQuickUI(workingDir) workingDir = tempDir()
test.log("Running project") projectName = createNewQtQuickUI(workingDir, quickVersion)
# TODO replace this quickfix with a proper identification of kits test.log("Running project Qt Quick %d UI" % quickVersion)
# changes to createNewQtQuickUI(...) after fixing QTCREATORBUG-8704 will probably handle this # TODO replace this quickfix with a proper identification of kits
kitCount = 2 # changes to createNewQtQuickUI(...) after fixing QTCREATORBUG-8704 will probably handle this
if platform.system() in ('Windows', 'Microsoft'): kitCount = 1
kitCount = 3 if quickVersion == 1:
qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(kitCount, workingDir, projectName, 11223) kitCount = 3
if qmlViewer!=None: if platform.system() in ('Windows', 'Microsoft'):
qmlViewerPath = os.path.dirname(qmlViewer) kitCount = 4
qmlViewer = os.path.basename(qmlViewer) qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(kitCount, workingDir, projectName, 11223)
result = addExecutableAsAttachableAUT(qmlViewer, 11223) if qmlViewer!=None:
allowAppThroughWinFW(qmlViewerPath, qmlViewer, None) qmlViewerPath = os.path.dirname(qmlViewer)
if result: qmlViewer = os.path.basename(qmlViewer)
result = runAndCloseApp(True, qmlViewer, 11223, sType=SubprocessType.QT_QUICK_UI) result = addExecutableAsAttachableAUT(qmlViewer, 11223)
allowAppThroughWinFW(qmlViewerPath, qmlViewer, None)
if result:
result = runAndCloseApp(True, qmlViewer, 11223, sType=SubprocessType.QT_QUICK_UI)
else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI)
removeExecutableAsAttachableAUT(qmlViewer, 11223)
deleteAppFromWinFW(qmlViewerPath, qmlViewer)
else: else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI) result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI)
removeExecutableAsAttachableAUT(qmlViewer, 11223) if result:
deleteAppFromWinFW(qmlViewerPath, qmlViewer) logApplicationOutput()
else: invokeMenuItem("File", "Close All Projects and Editors")
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI)
if result:
logApplicationOutput()
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")

View File

@@ -33,13 +33,16 @@ def main():
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError(): if not startedWithoutPluginError():
return return
# using a temporary directory won't mess up a potentially existing for targ, quickVer in {Targets.DESKTOP_480_GCC:1, Targets.DESKTOP_501_DEFAULT:2}.items():
createNewQmlExtension(tempDir()) # using a temporary directory won't mess up a potentially existing
# wait for parsing to complete createNewQmlExtension(tempDir(), targ, quickVer)
progressBarWait(30000) # wait for parsing to complete
test.log("Building project") progressBarWait(30000)
invokeMenuItem("Build","Build All") test.log("Building project Qt Quick %d Extension Plugin (%s)"
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)") % (quickVer, Targets.getStringForTarget(targ)))
checkCompile() invokeMenuItem("Build","Build All")
checkLastBuild() waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
checkCompile()
checkLastBuild()
invokeMenuItem("File", "Close All Projects and Editors")
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")