~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to tests/system/suite_qtquick/tst_qtquick_creation/test.py

  • Committer: Timo Jyrinki
  • Date: 2013-11-15 12:25:23 UTC
  • mfrom: (1.1.28)
  • Revision ID: timo.jyrinki@canonical.com-20131115122523-i2kyamsu4gs2mu1m
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    startApplication("qtcreator" + SettingsPath)
34
34
    if not startedWithoutPluginError():
35
35
        return
36
 
    # using a temporary directory won't mess up a potentially existing
37
 
    workingDir = tempDir()
38
 
    checkedTargets, projectName = createNewQtQuickApplication(workingDir,
39
 
                                                              targets = Targets.DESKTOP_474_GCC)
40
 
    test.log("Building project")
41
 
    result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223)
42
 
    invokeMenuItem("Build", "Build All")
43
 
    waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
44
 
    if not checkCompile():
45
 
        test.fatal("Compile failed")
46
 
    else:
47
 
        checkLastBuild()
48
 
        test.log("Running project (includes build)")
49
 
        if result:
50
 
            result = addExecutableAsAttachableAUT(projectName, 11223)
51
 
            allowAppThroughWinFW(workingDir, projectName)
 
36
    for targ, qVer in {Targets.DESKTOP_480_GCC:1, Targets.DESKTOP_501_DEFAULT:2}.items():
 
37
        # using a temporary directory won't mess up a potentially existing
 
38
        workingDir = tempDir()
 
39
        checkedTargets, projectName = createNewQtQuickApplication(workingDir, targets=targ,
 
40
                                                                  qtQuickVersion=qVer)
 
41
        test.log("Building project Qt Quick %d Application (%s)"
 
42
                 % (qVer, Targets.getStringForTarget(targ)))
 
43
        result = modifyRunSettingsForHookInto(projectName, len(checkedTargets), 11223)
 
44
        invokeMenuItem("Build", "Build All")
 
45
        waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
 
46
        if not checkCompile():
 
47
            test.fatal("Compile failed")
 
48
        else:
 
49
            checkLastBuild()
 
50
            test.log("Running project (includes build)")
52
51
            if result:
53
 
                result = runAndCloseApp(True, projectName, 11223, "subprocessFunction", SubprocessType.QT_QUICK_APPLICATION)
 
52
                result = addExecutableAsAttachableAUT(projectName, 11223)
 
53
                allowAppThroughWinFW(workingDir, projectName)
 
54
                if result:
 
55
                    result = runAndCloseApp(True, projectName, 11223, "subprocessFunction", SubprocessType.QT_QUICK_APPLICATION)
 
56
                else:
 
57
                    result = runAndCloseApp(sType=SubprocessType.QT_QUICK_APPLICATION)
 
58
                removeExecutableAsAttachableAUT(projectName, 11223)
 
59
                deleteAppFromWinFW(workingDir, projectName)
54
60
            else:
55
 
                result = runAndCloseApp(sType=SubprocessType.QT_QUICK_APPLICATION)
56
 
            removeExecutableAsAttachableAUT(projectName, 11223)
57
 
            deleteAppFromWinFW(workingDir, projectName)
58
 
        else:
59
 
            result = runAndCloseApp()
60
 
        if result:
61
 
            logApplicationOutput()
 
61
                result = runAndCloseApp()
 
62
            if result:
 
63
                logApplicationOutput()
 
64
        invokeMenuItem("File", "Close All Projects and Editors")
62
65
 
63
66
    invokeMenuItem("File", "Exit")
64
67