OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
439 def testGitMock(self): | 439 def testGitMock(self): |
440 self.Expect([Cmd("git --version", "git version 1.2.3"), | 440 self.Expect([Cmd("git --version", "git version 1.2.3"), |
441 Cmd("git dummy", "")]) | 441 Cmd("git dummy", "")]) |
442 self.assertEquals("git version 1.2.3", self.MakeStep().Git("--version")) | 442 self.assertEquals("git version 1.2.3", self.MakeStep().Git("--version")) |
443 self.assertEquals("", self.MakeStep().Git("dummy")) | 443 self.assertEquals("", self.MakeStep().Git("dummy")) |
444 | 444 |
445 def testCommonPrepareDefault(self): | 445 def testCommonPrepareDefault(self): |
446 self.Expect([ | 446 self.Expect([ |
447 Cmd("git status -s -uno", ""), | 447 Cmd("git status -s -uno", ""), |
448 Cmd("git status -s -b -uno", "## some_branch"), | 448 Cmd("git status -s -b -uno", "## some_branch"), |
449 Cmd("git fetch", ""), | |
449 Cmd("git svn fetch", ""), | 450 Cmd("git svn fetch", ""), |
450 Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]), | 451 Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]), |
451 RL("Y"), | 452 RL("Y"), |
452 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), | 453 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), |
453 ]) | 454 ]) |
454 self.MakeStep().CommonPrepare() | 455 self.MakeStep().CommonPrepare() |
455 self.MakeStep().PrepareBranch() | 456 self.MakeStep().PrepareBranch() |
456 self.assertEquals("some_branch", self._state["current_branch"]) | 457 self.assertEquals("some_branch", self._state["current_branch"]) |
457 | 458 |
458 def testCommonPrepareNoConfirm(self): | 459 def testCommonPrepareNoConfirm(self): |
459 self.Expect([ | 460 self.Expect([ |
460 Cmd("git status -s -uno", ""), | 461 Cmd("git status -s -uno", ""), |
461 Cmd("git status -s -b -uno", "## some_branch"), | 462 Cmd("git status -s -b -uno", "## some_branch"), |
463 Cmd("git fetch", ""), | |
462 Cmd("git svn fetch", ""), | 464 Cmd("git svn fetch", ""), |
463 Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]), | 465 Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]), |
464 RL("n"), | 466 RL("n"), |
465 ]) | 467 ]) |
466 self.MakeStep().CommonPrepare() | 468 self.MakeStep().CommonPrepare() |
467 self.assertRaises(Exception, self.MakeStep().PrepareBranch) | 469 self.assertRaises(Exception, self.MakeStep().PrepareBranch) |
468 self.assertEquals("some_branch", self._state["current_branch"]) | 470 self.assertEquals("some_branch", self._state["current_branch"]) |
469 | 471 |
470 def testCommonPrepareDeleteBranchFailure(self): | 472 def testCommonPrepareDeleteBranchFailure(self): |
471 self.Expect([ | 473 self.Expect([ |
472 Cmd("git status -s -uno", ""), | 474 Cmd("git status -s -uno", ""), |
473 Cmd("git status -s -b -uno", "## some_branch"), | 475 Cmd("git status -s -b -uno", "## some_branch"), |
476 Cmd("git fetch", ""), | |
474 Cmd("git svn fetch", ""), | 477 Cmd("git svn fetch", ""), |
475 Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]), | 478 Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]), |
476 RL("Y"), | 479 RL("Y"), |
477 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], None), | 480 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], None), |
478 ]) | 481 ]) |
479 self.MakeStep().CommonPrepare() | 482 self.MakeStep().CommonPrepare() |
480 self.assertRaises(Exception, self.MakeStep().PrepareBranch) | 483 self.assertRaises(Exception, self.MakeStep().PrepareBranch) |
481 self.assertEquals("some_branch", self._state["current_branch"]) | 484 self.assertEquals("some_branch", self._state["current_branch"]) |
482 | 485 |
483 def testInitialEnvironmentChecks(self): | 486 def testInitialEnvironmentChecks(self): |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
621 # Version on trunk: 3.22.4.0. Version on master (bleeding_edge): 3.22.6. | 624 # Version on trunk: 3.22.4.0. Version on master (bleeding_edge): 3.22.6. |
622 # Make sure that the increment is 3.22.7.0. | 625 # Make sure that the increment is 3.22.7.0. |
623 def testIncrementVersion(self): | 626 def testIncrementVersion(self): |
624 self.WriteFakeVersionFile() | 627 self.WriteFakeVersionFile() |
625 self._state["last_push_trunk"] = "hash1" | 628 self._state["last_push_trunk"] = "hash1" |
626 self._state["latest_build"] = "6" | 629 self._state["latest_build"] = "6" |
627 self._state["latest_version"] = "3.22.6.0" | 630 self._state["latest_version"] = "3.22.6.0" |
628 | 631 |
629 self.Expect([ | 632 self.Expect([ |
630 Cmd("git checkout -f hash1 -- src/version.cc", ""), | 633 Cmd("git checkout -f hash1 -- src/version.cc", ""), |
631 Cmd("git checkout -f svn/bleeding_edge -- src/version.cc", | 634 Cmd("git checkout -f origin/master -- src/version.cc", |
632 "", cb=lambda: self.WriteFakeVersionFile(22, 6)), | 635 "", cb=lambda: self.WriteFakeVersionFile(22, 6)), |
633 RL("Y"), # Increment build number. | 636 RL("Y"), # Increment build number. |
634 ]) | 637 ]) |
635 | 638 |
636 self.RunStep(PushToTrunk, IncrementVersion) | 639 self.RunStep(PushToTrunk, IncrementVersion) |
637 | 640 |
638 self.assertEquals("3", self._state["new_major"]) | 641 self.assertEquals("3", self._state["new_major"]) |
639 self.assertEquals("22", self._state["new_minor"]) | 642 self.assertEquals("22", self._state["new_minor"]) |
640 self.assertEquals("7", self._state["new_build"]) | 643 self.assertEquals("7", self._state["new_build"]) |
641 self.assertEquals("0", self._state["new_patch"]) | 644 self.assertEquals("0", self._state["new_patch"]) |
642 | 645 |
643 def _TestSquashCommits(self, change_log, expected_msg): | 646 def _TestSquashCommits(self, change_log, expected_msg): |
644 TEST_CONFIG["CHANGELOG_ENTRY_FILE"] = self.MakeEmptyTempFile() | 647 TEST_CONFIG["CHANGELOG_ENTRY_FILE"] = self.MakeEmptyTempFile() |
645 with open(TEST_CONFIG["CHANGELOG_ENTRY_FILE"], "w") as f: | 648 with open(TEST_CONFIG["CHANGELOG_ENTRY_FILE"], "w") as f: |
646 f.write(change_log) | 649 f.write(change_log) |
647 | 650 |
648 self.Expect([ | 651 self.Expect([ |
649 Cmd("git diff svn/trunk hash1", "patch content"), | 652 Cmd("git diff origin/candidates hash1", "patch content"), |
650 Cmd("git svn find-rev hash1", "123455\n"), | 653 Cmd("git svn find-rev hash1", "123455\n"), |
651 ]) | 654 ]) |
652 | 655 |
653 self._state["push_hash"] = "hash1" | 656 self._state["push_hash"] = "hash1" |
654 self._state["date"] = "1999-11-11" | 657 self._state["date"] = "1999-11-11" |
655 | 658 |
656 self.RunStep(PushToTrunk, SquashCommits) | 659 self.RunStep(PushToTrunk, SquashCommits) |
657 self.assertEquals(FileToText(TEST_CONFIG["COMMITMSG_FILE"]), expected_msg) | 660 self.assertEquals(FileToText(TEST_CONFIG["COMMITMSG_FILE"]), expected_msg) |
658 | 661 |
659 patch = FileToText(TEST_CONFIG["PATCH_FILE"]) | 662 patch = FileToText(TEST_CONFIG["PATCH_FILE"]) |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
811 Cmd("git svn dcommit 2>&1", ""), | 814 Cmd("git svn dcommit 2>&1", ""), |
812 Cmd("git svn fetch", ""), | 815 Cmd("git svn fetch", ""), |
813 Cmd("git rebase svn/trunk", ""), | 816 Cmd("git rebase svn/trunk", ""), |
814 Cmd("git svn tag 3.22.5 -m \"Tagging version 3.22.5\"", ""), | 817 Cmd("git svn tag 3.22.5 -m \"Tagging version 3.22.5\"", ""), |
815 Cmd("git checkout -f some_branch", ""), | 818 Cmd("git checkout -f some_branch", ""), |
816 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), | 819 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), |
817 Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""), | 820 Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""), |
818 ] | 821 ] |
819 self.Expect(expectations) | 822 self.Expect(expectations) |
820 | 823 |
821 args = ["-a", "author@chromium.org", "--revision", "123455"] | 824 args = ["-a", "author@chromium.org", "--revision", "123455", |
825 "--vc-interface", "git_svn",] | |
822 if force: args.append("-f") | 826 if force: args.append("-f") |
823 if manual: args.append("-m") | 827 if manual: args.append("-m") |
824 else: args += ["-r", "reviewer@chromium.org"] | 828 else: args += ["-r", "reviewer@chromium.org"] |
825 PushToTrunk(TEST_CONFIG, self).Run(args) | 829 PushToTrunk(TEST_CONFIG, self).Run(args) |
826 | 830 |
827 cl = FileToText(TEST_CONFIG["CHANGELOG_FILE"]) | 831 cl = FileToText(TEST_CONFIG["CHANGELOG_FILE"]) |
828 self.assertTrue(re.search(r"^\d\d\d\d\-\d+\-\d+: Version 3\.22\.5", cl)) | 832 self.assertTrue(re.search(r"^\d\d\d\d\-\d+\-\d+: Version 3\.22\.5", cl)) |
829 self.assertTrue(re.search(r" Log text 1 \(issue 321\).", cl)) | 833 self.assertTrue(re.search(r" Log text 1 \(issue 321\).", cl)) |
830 self.assertTrue(re.search(r"1999\-04\-05: Version 3\.22\.4", cl)) | 834 self.assertTrue(re.search(r"1999\-04\-05: Version 3\.22\.4", cl)) |
831 | 835 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1035 "-r", "reviewer@chromium.org"] | 1039 "-r", "reviewer@chromium.org"] |
1036 ChromiumRoll(TEST_CONFIG, self).Run(args) | 1040 ChromiumRoll(TEST_CONFIG, self).Run(args) |
1037 | 1041 |
1038 deps = FileToText(os.path.join(chrome_dir, "DEPS")) | 1042 deps = FileToText(os.path.join(chrome_dir, "DEPS")) |
1039 self.assertTrue(re.search("\"v8_revision\": \"22624\"", deps)) | 1043 self.assertTrue(re.search("\"v8_revision\": \"22624\"", deps)) |
1040 | 1044 |
1041 def testCheckLastPushRecently(self): | 1045 def testCheckLastPushRecently(self): |
1042 self.Expect([ | 1046 self.Expect([ |
1043 Cmd(("git log -1 --format=%H --grep=" | 1047 Cmd(("git log -1 --format=%H --grep=" |
1044 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" " | 1048 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" " |
1045 "svn/trunk"), "hash2\n"), | 1049 "origin/candidates"), "hash2\n"), |
1046 Cmd("git log -1 --format=%s hash2", | 1050 Cmd("git log -1 --format=%s hash2", |
1047 "Version 3.4.5 (based on bleeding_edge revision r99)\n"), | 1051 "Version 3.4.5 (based on bleeding_edge revision r99)\n"), |
1048 ]) | 1052 ]) |
1049 | 1053 |
1050 self._state["lkgr"] = "101" | 1054 self._state["lkgr"] = "101" |
1051 | 1055 |
1052 self.assertRaises(Exception, lambda: self.RunStep(auto_push.AutoPush, | 1056 self.assertRaises(Exception, lambda: self.RunStep(auto_push.AutoPush, |
1053 CheckLastPush, | 1057 CheckLastPush, |
1054 AUTO_PUSH_ARGS)) | 1058 AUTO_PUSH_ARGS)) |
1055 | 1059 |
1056 def testAutoPush(self): | 1060 def testAutoPush(self): |
1057 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) | 1061 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) |
1058 TEST_CONFIG["SETTINGS_LOCATION"] = "~/.doesnotexist" | 1062 TEST_CONFIG["SETTINGS_LOCATION"] = "~/.doesnotexist" |
1059 | 1063 |
1060 self.Expect([ | 1064 self.Expect([ |
1061 Cmd("git status -s -uno", ""), | 1065 Cmd("git status -s -uno", ""), |
1062 Cmd("git status -s -b -uno", "## some_branch\n"), | 1066 Cmd("git status -s -b -uno", "## some_branch\n"), |
1067 Cmd("git fetch", ""), | |
1063 Cmd("git svn fetch", ""), | 1068 Cmd("git svn fetch", ""), |
1064 URL("https://v8-status.appspot.com/current?format=json", | 1069 URL("https://v8-status.appspot.com/current?format=json", |
1065 "{\"message\": \"Tree is throttled\"}"), | 1070 "{\"message\": \"Tree is throttled\"}"), |
1066 URL("https://v8-status.appspot.com/lkgr", Exception("Network problem")), | 1071 URL("https://v8-status.appspot.com/lkgr", Exception("Network problem")), |
1067 URL("https://v8-status.appspot.com/lkgr", "100"), | 1072 URL("https://v8-status.appspot.com/lkgr", "100"), |
1068 Cmd(("git log -1 --format=%H --grep=\"" | 1073 Cmd(("git log -1 --format=%H --grep=\"" |
1069 "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\"" | 1074 "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\"" |
1070 " svn/trunk"), "push_hash\n"), | 1075 " origin/candidates"), "push_hash\n"), |
1071 Cmd("git log -1 --format=%s push_hash", | 1076 Cmd("git log -1 --format=%s push_hash", |
1072 "Version 3.4.5 (based on bleeding_edge revision r79)\n"), | 1077 "Version 3.4.5 (based on bleeding_edge revision r79)\n"), |
1073 ]) | 1078 ]) |
1074 | 1079 |
1075 auto_push.AutoPush(TEST_CONFIG, self).Run(AUTO_PUSH_ARGS + ["--push"]) | 1080 auto_push.AutoPush(TEST_CONFIG, self).Run(AUTO_PUSH_ARGS + ["--push"]) |
1076 | 1081 |
1077 state = json.loads(FileToText("%s-state.json" | 1082 state = json.loads(FileToText("%s-state.json" |
1078 % TEST_CONFIG["PERSISTFILE_BASENAME"])) | 1083 % TEST_CONFIG["PERSISTFILE_BASENAME"])) |
1079 | 1084 |
1080 self.assertEquals("100", state["lkgr"]) | 1085 self.assertEquals("100", state["lkgr"]) |
1081 | 1086 |
1082 def testAutoPushStoppedBySettings(self): | 1087 def testAutoPushStoppedBySettings(self): |
1083 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) | 1088 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) |
1084 TEST_CONFIG["SETTINGS_LOCATION"] = self.MakeEmptyTempFile() | 1089 TEST_CONFIG["SETTINGS_LOCATION"] = self.MakeEmptyTempFile() |
1085 TextToFile("{\"enable_auto_push\": false}", | 1090 TextToFile("{\"enable_auto_push\": false}", |
1086 TEST_CONFIG["SETTINGS_LOCATION"]) | 1091 TEST_CONFIG["SETTINGS_LOCATION"]) |
1087 | 1092 |
1088 self.Expect([ | 1093 self.Expect([ |
1089 Cmd("git status -s -uno", ""), | 1094 Cmd("git status -s -uno", ""), |
1090 Cmd("git status -s -b -uno", "## some_branch\n"), | 1095 Cmd("git status -s -b -uno", "## some_branch\n"), |
1096 Cmd("git fetch", ""), | |
1091 Cmd("git svn fetch", ""), | 1097 Cmd("git svn fetch", ""), |
1092 ]) | 1098 ]) |
1093 | 1099 |
1094 def RunAutoPush(): | 1100 def RunAutoPush(): |
1095 auto_push.AutoPush(TEST_CONFIG, self).Run(AUTO_PUSH_ARGS) | 1101 auto_push.AutoPush(TEST_CONFIG, self).Run(AUTO_PUSH_ARGS) |
1096 self.assertRaises(Exception, RunAutoPush) | 1102 self.assertRaises(Exception, RunAutoPush) |
1097 | 1103 |
1098 def testAutoPushStoppedByTreeStatus(self): | 1104 def testAutoPushStoppedByTreeStatus(self): |
1099 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) | 1105 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) |
1100 TEST_CONFIG["SETTINGS_LOCATION"] = "~/.doesnotexist" | 1106 TEST_CONFIG["SETTINGS_LOCATION"] = "~/.doesnotexist" |
1101 | 1107 |
1102 self.Expect([ | 1108 self.Expect([ |
1103 Cmd("git status -s -uno", ""), | 1109 Cmd("git status -s -uno", ""), |
1104 Cmd("git status -s -b -uno", "## some_branch\n"), | 1110 Cmd("git status -s -b -uno", "## some_branch\n"), |
1111 Cmd("git fetch", ""), | |
1105 Cmd("git svn fetch", ""), | 1112 Cmd("git svn fetch", ""), |
1106 URL("https://v8-status.appspot.com/current?format=json", | 1113 URL("https://v8-status.appspot.com/current?format=json", |
1107 "{\"message\": \"Tree is throttled (no push)\"}"), | 1114 "{\"message\": \"Tree is throttled (no push)\"}"), |
1108 ]) | 1115 ]) |
1109 | 1116 |
1110 def RunAutoPush(): | 1117 def RunAutoPush(): |
1111 auto_push.AutoPush(TEST_CONFIG, self).Run(AUTO_PUSH_ARGS) | 1118 auto_push.AutoPush(TEST_CONFIG, self).Run(AUTO_PUSH_ARGS) |
1112 self.assertRaises(Exception, RunAutoPush) | 1119 self.assertRaises(Exception, RunAutoPush) |
1113 | 1120 |
1114 def testAutoRollExistingRoll(self): | 1121 def testAutoRollExistingRoll(self): |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1759 Cmd("git checkout -f master", ""), | 1766 Cmd("git checkout -f master", ""), |
1760 Cmd("git branch", "auto-bump-up-version\n* master"), | 1767 Cmd("git branch", "auto-bump-up-version\n* master"), |
1761 Cmd("git branch -D auto-bump-up-version", ""), | 1768 Cmd("git branch -D auto-bump-up-version", ""), |
1762 ] | 1769 ] |
1763 self.Expect(expectations) | 1770 self.Expect(expectations) |
1764 | 1771 |
1765 BumpUpVersion(TEST_CONFIG, self).Run( | 1772 BumpUpVersion(TEST_CONFIG, self).Run( |
1766 ["-a", "author@chromium.org", | 1773 ["-a", "author@chromium.org", |
1767 "--svn", svn_root, | 1774 "--svn", svn_root, |
1768 "--svn-config", "[CONFIG_DIR]"]) | 1775 "--svn-config", "[CONFIG_DIR]"]) |
1769 | 1776 |
Michael Achenbach
2014/10/23 14:21:24
Deprecated script. Will fix the test expectations
| |
1770 def testAutoTag(self): | |
1771 self.WriteFakeVersionFile() | |
1772 | |
1773 def ResetVersion(minor, build, patch=0): | |
1774 return lambda: self.WriteFakeVersionFile(minor=minor, | |
1775 build=build, | |
1776 patch=patch) | |
1777 | |
1778 self.Expect([ | |
1779 Cmd("git status -s -uno", ""), | |
1780 Cmd("git status -s -b -uno", "## some_branch\n"), | |
1781 Cmd("git svn fetch", ""), | |
1782 Cmd("git branch", " branch1\n* branch2\n"), | |
1783 Cmd("git checkout -f master", ""), | |
1784 Cmd("git svn rebase", ""), | |
1785 Cmd("git checkout -b %s" % TEST_CONFIG["BRANCHNAME"], "", | |
1786 cb=ResetVersion(4, 5)), | |
1787 Cmd("git branch -r", | |
1788 "svn/tags/3.4.2\nsvn/tags/3.2.1.0\nsvn/branches/3.4"), | |
1789 Cmd(("git log --format=%H --grep=" | |
1790 "\"\\[Auto\\-roll\\] Bump up version to\""), | |
1791 "hash125\nhash118\nhash111\nhash101"), | |
1792 Cmd("git checkout -f hash125 -- %s" % VERSION_FILE, "", | |
1793 cb=ResetVersion(4, 4)), | |
1794 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", | |
1795 cb=ResetVersion(4, 5)), | |
1796 Cmd("git checkout -f hash118 -- %s" % VERSION_FILE, "", | |
1797 cb=ResetVersion(4, 3)), | |
1798 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", | |
1799 cb=ResetVersion(4, 5)), | |
1800 Cmd("git checkout -f hash111 -- %s" % VERSION_FILE, "", | |
1801 cb=ResetVersion(4, 2)), | |
1802 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", | |
1803 cb=ResetVersion(4, 5)), | |
1804 URL("https://v8-status.appspot.com/revisions?format=json", | |
1805 "[{\"revision\": \"126\", \"status\": true}," | |
1806 "{\"revision\": \"123\", \"status\": true}," | |
1807 "{\"revision\": \"112\", \"status\": true}]"), | |
1808 Cmd("git svn find-rev hash118", "118"), | |
1809 Cmd("git svn find-rev hash125", "125"), | |
1810 Cmd("git svn find-rev r123", "hash123"), | |
1811 Cmd("git log -1 --format=%at hash123", "1"), | |
1812 Cmd("git reset --hard hash123", ""), | |
1813 Cmd("git svn fetch", ""), | |
1814 Cmd("git rebase svn/bleeding_edge", ""), | |
1815 Cmd("git svn tag 3.4.3 -m \"Tagging version 3.4.3\"", ""), | |
1816 Cmd("git checkout -f some_branch", ""), | |
1817 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), | |
1818 ]) | |
1819 | |
1820 AutoTag(TEST_CONFIG, self).Run(["-a", "author@chromium.org"]) | |
1821 | |
1822 # Test that we bail out if the last change was a version change. | 1777 # Test that we bail out if the last change was a version change. |
1823 def testBumpUpVersionBailout1(self): | 1778 def testBumpUpVersionBailout1(self): |
1824 self._state["latest"] = "latest_hash" | 1779 self._state["latest"] = "latest_hash" |
1825 | 1780 |
1826 self.Expect([ | 1781 self.Expect([ |
1827 Cmd("git diff --name-only latest_hash latest_hash^", VERSION_FILE), | 1782 Cmd("git diff --name-only latest_hash latest_hash^", VERSION_FILE), |
1828 ]) | 1783 ]) |
1829 | 1784 |
1830 self.assertEquals(0, | 1785 self.assertEquals(0, |
1831 self.RunStep(BumpUpVersion, LastChangeBailout, ["--dry_run"])) | 1786 self.RunStep(BumpUpVersion, LastChangeBailout, ["--dry_run"])) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1873 | 1828 |
1874 Review URL: https://codereview.chromium.org/83173002 | 1829 Review URL: https://codereview.chromium.org/83173002 |
1875 | 1830 |
1876 ------------------------------------------------------------------------""") | 1831 ------------------------------------------------------------------------""") |
1877 self.assertEquals( | 1832 self.assertEquals( |
1878 """Prepare push to trunk. Now working on version 3.23.11. | 1833 """Prepare push to trunk. Now working on version 3.23.11. |
1879 | 1834 |
1880 R=danno@chromium.org | 1835 R=danno@chromium.org |
1881 | 1836 |
1882 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1837 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
OLD | NEW |