Commit 8ff61e30 authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Enable Qt5 for suite_qtquick test cases



Change-Id: I84caf3b4c47badcf444242b6fbc52090ccb5680a
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent 1cecc5b0
......@@ -33,32 +33,35 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
checkedTargets, projectName = createNewQtQuickApplication(workingDir,
targets = Targets.DESKTOP_474_GCC)
test.log("Building project")
result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223)
invokeMenuItem("Build", "Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
if not checkCompile():
test.fatal("Compile failed")
else:
checkLastBuild()
test.log("Running project (includes build)")
if result:
result = addExecutableAsAttachableAUT(projectName, 11223)
allowAppThroughWinFW(workingDir, projectName)
for targ, qVer in {Targets.DESKTOP_480_GCC:1, Targets.DESKTOP_501_DEFAULT:2}.items():
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
checkedTargets, projectName = createNewQtQuickApplication(workingDir, targets=targ,
qtQuickVersion=qVer)
test.log("Building project Qt Quick %d Application (%s)"
% (qVer, Targets.getStringForTarget(targ)))
result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223)
invokeMenuItem("Build", "Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
if not checkCompile():
test.fatal("Compile failed")
else:
checkLastBuild()
test.log("Running project (includes build)")
if result:
result = runAndCloseApp(True, projectName, 11223, "subprocessFunction", SubprocessType.QT_QUICK_APPLICATION)
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(sType=SubprocessType.QT_QUICK_APPLICATION)
removeExecutableAsAttachableAUT(projectName, 11223)
deleteAppFromWinFW(workingDir, projectName)
else:
result = runAndCloseApp()
if result:
logApplicationOutput()
result = runAndCloseApp()
if result:
logApplicationOutput()
invokeMenuItem("File", "Close All Projects and Editors")
invokeMenuItem("File", "Exit")
......
......@@ -30,40 +30,49 @@
source("../../shared/qtcreator.py")
def main():
sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/text/textselection")
qmlFile = os.path.join("qml", "textselection.qml")
if not neededFilePresent(os.path.join(sourceExample, qmlFile)):
sourceExampleQt4 = os.path.join(sdkPath, "Examples", "4.7", "declarative", "text",
"textselection", "qml", "textselection.qml")
sourceExampleQt5 = os.path.join(qt5SDKPath(), "examples", "quick", "text", "textselection",
"textselection.qml")
if not neededFilePresent(sourceExampleQt4):
return
if not neededFilePresent(sourceExampleQt5):
return
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
checkedTargets, projectName = createNewQtQuickApplication(workingDir, None,
os.path.join(prepareTemplate(sourceExample), qmlFile),
Targets.DESKTOP_474_GCC)
test.log("Building project")
result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223)
invokeMenuItem("Build","Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
if not checkCompile():
test.fatal("Compile failed")
else:
checkLastBuild()
test.log("Running project (includes build)")
if result:
result = addExecutableAsAttachableAUT(projectName, 11223)
allowAppThroughWinFW(workingDir, projectName)
targetsAndQuickVersion = {Targets.DESKTOP_480_GCC:[1, sourceExampleQt4],
Targets.DESKTOP_501_DEFAULT:[2, sourceExampleQt5]}
for targ, qVerAndEx in targetsAndQuickVersion.items():
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
checkedTargets, projectName = createNewQtQuickApplication(workingDir, None,
qVerAndEx[1],
targ, qVerAndEx[0])
test.log("Building project Qt Quick %d Application (%s)"
% (qVerAndEx[0], Targets.getStringForTarget(targ)))
result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223)
invokeMenuItem("Build","Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
if not checkCompile():
test.fatal("Compile failed")
else:
checkLastBuild()
test.log("Running project (includes build)")
if result:
result = runAndCloseApp(True, projectName, 11223, subprocessFunction, SubprocessType.QT_QUICK_APPLICATION)
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(sType=SubprocessType.QT_QUICK_APPLICATION)
removeExecutableAsAttachableAUT(projectName, 11223)
deleteAppFromWinFW(workingDir, projectName)
else:
result = runAndCloseApp()
if result:
logApplicationOutput()
result = runAndCloseApp()
if result:
logApplicationOutput()
invokeMenuItem("File", "Close All Projects and Editors")
invokeMenuItem("File", "Exit")
def subprocessFunction():
......
......@@ -33,29 +33,33 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
projectName = createNewQtQuickUI(workingDir)
test.log("Running project")
# TODO replace this quickfix with a proper identification of kits
# changes to createNewQtQuickUI(...) after fixing QTCREATORBUG-8704 will probably handle this
kitCount = 2
if platform.system() in ('Windows', 'Microsoft'):
kitCount = 3
qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(kitCount, workingDir, projectName, 11223)
if qmlViewer!=None:
qmlViewerPath = os.path.dirname(qmlViewer)
qmlViewer = os.path.basename(qmlViewer)
result = addExecutableAsAttachableAUT(qmlViewer, 11223)
allowAppThroughWinFW(qmlViewerPath, qmlViewer, None)
if result:
result = runAndCloseApp(True, qmlViewer, 11223, sType=SubprocessType.QT_QUICK_UI)
for quickVersion in [1, 2]:
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
projectName = createNewQtQuickUI(workingDir, quickVersion)
test.log("Running project Qt Quick %d UI" % quickVersion)
# TODO replace this quickfix with a proper identification of kits
# changes to createNewQtQuickUI(...) after fixing QTCREATORBUG-8704 will probably handle this
kitCount = 1
if quickVersion == 1:
kitCount = 3
if platform.system() in ('Windows', 'Microsoft'):
kitCount = 4
qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(kitCount, workingDir, projectName, 11223)
if qmlViewer!=None:
qmlViewerPath = os.path.dirname(qmlViewer)
qmlViewer = os.path.basename(qmlViewer)
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:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI)
removeExecutableAsAttachableAUT(qmlViewer, 11223)
deleteAppFromWinFW(qmlViewerPath, qmlViewer)
else:
result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI)
if result:
logApplicationOutput()
if result:
logApplicationOutput()
invokeMenuItem("File", "Close All Projects and Editors")
invokeMenuItem("File", "Exit")
......@@ -33,13 +33,16 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
# using a temporary directory won't mess up a potentially existing
createNewQmlExtension(tempDir())
# wait for parsing to complete
progressBarWait(30000)
test.log("Building project")
invokeMenuItem("Build","Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
checkCompile()
checkLastBuild()
for targ, quickVer in {Targets.DESKTOP_480_GCC:1, Targets.DESKTOP_501_DEFAULT:2}.items():
# using a temporary directory won't mess up a potentially existing
createNewQmlExtension(tempDir(), targ, quickVer)
# wait for parsing to complete
progressBarWait(30000)
test.log("Building project Qt Quick %d Extension Plugin (%s)"
% (quickVer, Targets.getStringForTarget(targ)))
invokeMenuItem("Build","Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
checkCompile()
checkLastBuild()
invokeMenuItem("File", "Close All Projects and Editors")
invokeMenuItem("File", "Exit")
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