diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-12-18 15:10:58 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-12-18 15:10:58 +0100 |
commit | 8cad383b8003ad00a25f8610e9ca71a6a83a7700 (patch) | |
tree | cae2eb11998d3a1055d7e323871d4aba412a0a33 | |
parent | 9b9d339c101e9fadc12da4d2b2372daa8817ebac (diff) | |
parent | 83a370591210d1fc7b3ffe7d9353d217ec46184f (diff) | |
download | qt-creator-8cad383b8003ad00a25f8610e9ca71a6a83a7700.tar.gz |
Merge remote-tracking branch 'origin/3.0'
-rw-r--r-- | qtcreator.pri | 2 | ||||
-rw-r--r-- | tests/system/suite_tools/tst_git_local/test.py | 35 |
2 files changed, 30 insertions, 7 deletions
diff --git a/qtcreator.pri b/qtcreator.pri index 318a4db2a7..175070567f 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -154,7 +154,7 @@ INCLUDEPATH += \ $$IDE_SOURCE_TREE/tools QTC_PLUGIN_DIRS += $$IDE_SOURCE_TREE/src/plugins -for (dir, QTC_PLUGIN_DIRS) { +for(dir, QTC_PLUGIN_DIRS) { INCLUDEPATH += $$dir } diff --git a/tests/system/suite_tools/tst_git_local/test.py b/tests/system/suite_tools/tst_git_local/test.py index 1d28125d7b..125bf7d110 100644 --- a/tests/system/suite_tools/tst_git_local/test.py +++ b/tests/system/suite_tools/tst_git_local/test.py @@ -44,6 +44,13 @@ def commit(commitMessage, expectedLogMessage): test.verify(expectedLogMessage in str(vcsLog), "Searching for '%s' in log:\n%s " % (expectedLogMessage, vcsLog)) return commitMessage +def verifyItemsInGit(commitMessages): + gitEditor = waitForObject(":Qt Creator_Git::Internal::GitEditor") + waitFor("str(gitEditor.plainText) != 'Waiting for data...'", 20000) + plainText = str(gitEditor.plainText) + verifyItemOrder(commitMessages, plainText) + return plainText + def main(): startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): @@ -63,19 +70,35 @@ def main(): addCPlusPlusFileToCurrentProject("pointless_header.h", "C++ Header File", addToVCS = "Git") commitMessages.insert(0, commit("Added pointless header file", "Committed 2 file(s).")) __createProjectOrFileSelectType__(" General", "Text File", isProject=False) - replaceEditorContent(waitForObject(":New Text File.nameLineEdit_Utils::FileNameValidatingLineEdit"), "README") + readmeName = "README" + replaceEditorContent(waitForObject(":New Text File.nameLineEdit_Utils::FileNameValidatingLineEdit"), readmeName) clickButton(waitForObject(":Next_QPushButton")) - __createProjectHandleLastPage__(["README.txt"], "Git", "<None>") + readmeName += ".txt" + __createProjectHandleLastPage__([readmeName], "Git", "<None>") replaceEditorContent(waitForObject(":Qt Creator_TextEditor::PlainTextEditorWidget"), "Some important advice in the README") invokeMenuItem("File", "Save All") - commitMessages.insert(0, commit("Added README file", "Committed 2 file(s).")) # QTCREATORBUG-11074 + commitsInProject = list(commitMessages) # deep copy + commitOutsideProject = commit("Added README file", "Committed 2 file(s).") # QTCREATORBUG-11074 + commitMessages.insert(0, commitOutsideProject) + + invokeMenuItem('Tools', 'Git', 'Current File', 'Log of "%s"' % readmeName) + fileLog = verifyItemsInGit([commitOutsideProject]) + for commitMessage in commitsInProject: + test.verify(not commitMessage in fileLog, + "Verify that no unrelated commits are displayed in file log") + invokeMenuItem("File", "Close All") + + invokeMenuItem('Tools', 'Git', 'Current Project', 'Log Project "%s"' % projectName) + projectLog = verifyItemsInGit(commitsInProject) + test.xverify(not commitOutsideProject in projectLog, # QTCREATORBUG-10170 + "Verify that no unrelated commits are displayed in project log") invokeMenuItem("File", "Close All") + invokeMenuItem("Tools", "Git", "Local Repository", "Log") - gitEditor = waitForObject(":Qt Creator_Git::Internal::GitEditor") - waitFor("str(gitEditor.plainText) != 'Waiting for data...'", 20000) - verifyItemOrder(commitMessages, gitEditor.plainText) + verifyItemsInGit(commitMessages) invokeMenuItem("File", "Close All Projects and Editors") + invokeMenuItem("File", "Exit") def deleteProject(): |