~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to tests/system/suite_tools/tst_git_clone/test.py

  • Committer: Timo Jyrinki
  • Date: 2013-12-02 09:16:15 UTC
  • mfrom: (1.1.29)
  • Revision ID: timo.jyrinki@canonical.com-20131202091615-xbj1os1f604ber1m
New upstream release candidate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
cloneDir = "myCloneOfJom"
34
34
 
35
35
def verifyCloneLog(targetDir, canceled):
 
36
    # Expect fails because of QTCREATORBUG-10531
36
37
    cloneLog = waitForObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit")
37
 
    waitFor('"The process terminated " in str(cloneLog.plainText)', 30000)
38
 
    test.verify(("Executing in " + targetDir + ":" in str(cloneLog.plainText)),
39
 
                "Searching for target directory in clone log")
40
 
    test.verify((" ".join(["clone", cloneUrl, cloneDir]) in str(cloneLog.plainText)),
41
 
                "Searching for git parameters in clone log")
42
 
    test.verify(("Stopping..." in str(cloneLog.plainText)) ^ (not canceled),
43
 
                "Searching for 'Stopping...' in clone log")
 
38
    finish = findObject(":Git Repository Clone.Finish_QPushButton")
 
39
    waitFor("finish.enabled", 30000)
 
40
    test.xverify(("Executing in " + targetDir + ":" in str(cloneLog.plainText)),
 
41
                 "Searching for target directory in clone log")
 
42
    test.xverify((" ".join(["clone", cloneUrl, cloneDir]) in str(cloneLog.plainText)),
 
43
                 "Searching for git parameters in clone log")
44
44
    if canceled:
 
45
        test.xverify("Stopping..." in str(cloneLog.plainText),
 
46
                     "Searching for 'Stopping...' in clone log")
45
47
        result = "The process terminated in an abnormal way."
46
48
        summary = "Failed."
47
49
    else:
 
50
        test.verify(not "Stopping..." in str(cloneLog.plainText),
 
51
                    "Searching for 'Stopping...' in clone log")
48
52
        test.verify(("'" + cloneDir + "'..." in str(cloneLog.plainText)),
49
53
                    "Searching for clone directory in clone log")
50
54
        result = "The process terminated with exit code 0."
51
55
        summary = "Succeeded."
52
 
    test.verify((result in str(cloneLog.plainText)),
53
 
                "Searching for result (%s) in clone log:\n%s"
 
56
    test.xverify((result in str(cloneLog.plainText)),
 
57
                 "Searching for result (%s) in clone log:\n%s"
54
58
                % (result, str(cloneLog.plainText)))
55
59
    test.compare(waitForObject(":Git Repository Clone.Result._QLabel").text, summary)
56
60
 
79
83
        replaceEditorContent(cloneDirEdit, cloneDir)
80
84
        clickButton(waitForObject(":Next_QPushButton"))
81
85
        test.compare(waitForObject(":Git Repository Clone.Result._QLabel").text,
82
 
                     "Checkout started...")
 
86
                     "Cloning started...")
83
87
        if button == "Cancel immediately":
84
88
            clickButton(":Git Repository Clone.Cancel_QPushButton")
85
89
            verifyCloneLog(targetDir, True)