Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: tools/push-to-trunk/test_scripts.py

Issue 710593003: Fix change log creation in push script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/push-to-trunk/push_to_trunk.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 from bump_up_version import LastChangeBailout 50 from bump_up_version import LastChangeBailout
51 from bump_up_version import LKGRVersionUpToDateBailout 51 from bump_up_version import LKGRVersionUpToDateBailout
52 from auto_tag import AutoTag 52 from auto_tag import AutoTag
53 53
54 54
55 TEST_CONFIG = { 55 TEST_CONFIG = {
56 "DEFAULT_CWD": None, 56 "DEFAULT_CWD": None,
57 "BRANCHNAME": "test-prepare-push", 57 "BRANCHNAME": "test-prepare-push",
58 "TRUNKBRANCH": "test-trunk-push", 58 "TRUNKBRANCH": "test-trunk-push",
59 "PERSISTFILE_BASENAME": "/tmp/test-v8-push-to-trunk-tempfile", 59 "PERSISTFILE_BASENAME": "/tmp/test-v8-push-to-trunk-tempfile",
60 "CHANGELOG_FILE": None,
61 "CHANGELOG_ENTRY_FILE": "/tmp/test-v8-push-to-trunk-tempfile-changelog-entry", 60 "CHANGELOG_ENTRY_FILE": "/tmp/test-v8-push-to-trunk-tempfile-changelog-entry",
62 "PATCH_FILE": "/tmp/test-v8-push-to-trunk-tempfile-patch", 61 "PATCH_FILE": "/tmp/test-v8-push-to-trunk-tempfile-patch",
63 "COMMITMSG_FILE": "/tmp/test-v8-push-to-trunk-tempfile-commitmsg", 62 "COMMITMSG_FILE": "/tmp/test-v8-push-to-trunk-tempfile-commitmsg",
64 "CHROMIUM": "/tmp/test-v8-push-to-trunk-tempfile-chromium", 63 "CHROMIUM": "/tmp/test-v8-push-to-trunk-tempfile-chromium",
65 "SETTINGS_LOCATION": None, 64 "SETTINGS_LOCATION": None,
66 "ALREADY_MERGING_SENTINEL_FILE": 65 "ALREADY_MERGING_SENTINEL_FILE":
67 "/tmp/test-merge-to-branch-tempfile-already-merging", 66 "/tmp/test-merge-to-branch-tempfile-already-merging",
68 "TEMPORARY_PATCH_FILE": "/tmp/test-merge-to-branch-tempfile-temporary-patch", 67 "TEMPORARY_PATCH_FILE": "/tmp/test-merge-to-branch-tempfile-temporary-patch",
69 "CLUSTERFUZZ_API_KEY_FILE": "/tmp/test-fake-cf-api-key", 68 "CLUSTERFUZZ_API_KEY_FILE": "/tmp/test-fake-cf-api-key",
70 } 69 }
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 FakeScript(fake_config, self).Run(["--work-dir", work_dir]) 709 FakeScript(fake_config, self).Run(["--work-dir", work_dir])
711 710
712 def _PushToTrunk(self, force=False, manual=False): 711 def _PushToTrunk(self, force=False, manual=False):
713 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) 712 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git"))
714 713
715 # The version file on bleeding edge has build level 5, while the version 714 # The version file on bleeding edge has build level 5, while the version
716 # file from trunk has build level 4. 715 # file from trunk has build level 4.
717 self.WriteFakeVersionFile(build=5) 716 self.WriteFakeVersionFile(build=5)
718 717
719 TEST_CONFIG["CHANGELOG_ENTRY_FILE"] = self.MakeEmptyTempFile() 718 TEST_CONFIG["CHANGELOG_ENTRY_FILE"] = self.MakeEmptyTempFile()
720 TEST_CONFIG["CHANGELOG_FILE"] = self.MakeEmptyTempFile()
721 bleeding_edge_change_log = "2014-03-17: Sentinel\n" 719 bleeding_edge_change_log = "2014-03-17: Sentinel\n"
722 TextToFile(bleeding_edge_change_log, TEST_CONFIG["CHANGELOG_FILE"]) 720 TextToFile(bleeding_edge_change_log,
721 os.path.join(TEST_CONFIG["DEFAULT_CWD"], CHANGELOG_FILE))
723 os.environ["EDITOR"] = "vi" 722 os.environ["EDITOR"] = "vi"
724 723
725 def ResetChangeLog(): 724 def ResetChangeLog():
726 """On 'git co -b new_branch svn/trunk', and 'git checkout -- ChangeLog', 725 """On 'git co -b new_branch svn/trunk', and 'git checkout -- ChangeLog',
727 the ChangLog will be reset to its content on trunk.""" 726 the ChangLog will be reset to its content on trunk."""
728 trunk_change_log = """1999-04-05: Version 3.22.4 727 trunk_change_log = """1999-04-05: Version 3.22.4
729 728
730 Performance and stability improvements on all platforms.\n""" 729 Performance and stability improvements on all platforms.\n"""
731 TextToFile(trunk_change_log, TEST_CONFIG["CHANGELOG_FILE"]) 730 TextToFile(trunk_change_log,
731 os.path.join(TEST_CONFIG["DEFAULT_CWD"], CHANGELOG_FILE))
732 732
733 def ResetToTrunk(): 733 def ResetToTrunk():
734 ResetChangeLog() 734 ResetChangeLog()
735 self.WriteFakeVersionFile() 735 self.WriteFakeVersionFile()
736 736
737 def CheckSVNCommit(): 737 def CheckSVNCommit():
738 commit = FileToText(TEST_CONFIG["COMMITMSG_FILE"]) 738 commit = FileToText(TEST_CONFIG["COMMITMSG_FILE"])
739 self.assertEquals( 739 self.assertEquals(
740 """Version 3.22.5 (based on push_hash) 740 """Version 3.22.5 (based on push_hash)
741 741
742 Log text 1 (issue 321). 742 Log text 1 (issue 321).
743 743
744 Performance and stability improvements on all platforms.""", commit) 744 Performance and stability improvements on all platforms.""", commit)
745 version = FileToText( 745 version = FileToText(
746 os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE)) 746 os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE))
747 self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version)) 747 self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version))
748 self.assertTrue(re.search(r"#define BUILD_NUMBER\s+5", version)) 748 self.assertTrue(re.search(r"#define BUILD_NUMBER\s+5", version))
749 self.assertFalse(re.search(r"#define BUILD_NUMBER\s+6", version)) 749 self.assertFalse(re.search(r"#define BUILD_NUMBER\s+6", version))
750 self.assertTrue(re.search(r"#define PATCH_LEVEL\s+0", version)) 750 self.assertTrue(re.search(r"#define PATCH_LEVEL\s+0", version))
751 self.assertTrue(re.search(r"#define IS_CANDIDATE_VERSION\s+0", version)) 751 self.assertTrue(re.search(r"#define IS_CANDIDATE_VERSION\s+0", version))
752 752
753 # Check that the change log on the trunk branch got correctly modified. 753 # Check that the change log on the trunk branch got correctly modified.
754 change_log = FileToText(TEST_CONFIG["CHANGELOG_FILE"]) 754 change_log = FileToText(
755 os.path.join(TEST_CONFIG["DEFAULT_CWD"], CHANGELOG_FILE))
755 self.assertEquals( 756 self.assertEquals(
756 """1999-07-31: Version 3.22.5 757 """1999-07-31: Version 3.22.5
757 758
758 Log text 1 (issue 321). 759 Log text 1 (issue 321).
759 760
760 Performance and stability improvements on all platforms. 761 Performance and stability improvements on all platforms.
761 762
762 763
763 1999-04-05: Version 3.22.4 764 1999-04-05: Version 3.22.4
764 765
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 expectations.append( 809 expectations.append(
809 Cmd("vi %s" % TEST_CONFIG["CHANGELOG_ENTRY_FILE"], "")) 810 Cmd("vi %s" % TEST_CONFIG["CHANGELOG_ENTRY_FILE"], ""))
810 expectations += [ 811 expectations += [
811 Cmd("git fetch", ""), 812 Cmd("git fetch", ""),
812 Cmd("git svn fetch", "fetch result\n"), 813 Cmd("git svn fetch", "fetch result\n"),
813 Cmd("git checkout -f origin/master", ""), 814 Cmd("git checkout -f origin/master", ""),
814 Cmd("git diff origin/candidates push_hash", "patch content\n"), 815 Cmd("git diff origin/candidates push_hash", "patch content\n"),
815 Cmd(("git new-branch %s --upstream origin/candidates" % 816 Cmd(("git new-branch %s --upstream origin/candidates" %
816 TEST_CONFIG["TRUNKBRANCH"]), "", cb=ResetToTrunk), 817 TEST_CONFIG["TRUNKBRANCH"]), "", cb=ResetToTrunk),
817 Cmd("git apply --index --reject \"%s\"" % TEST_CONFIG["PATCH_FILE"], ""), 818 Cmd("git apply --index --reject \"%s\"" % TEST_CONFIG["PATCH_FILE"], ""),
818 Cmd(("git checkout -f origin/candidates -- %s" % 819 Cmd("git checkout -f origin/candidates -- ChangeLog", "",
819 TEST_CONFIG["CHANGELOG_FILE"]), "",
820 cb=ResetChangeLog), 820 cb=ResetChangeLog),
821 Cmd("git checkout -f origin/candidates -- src/version.cc", "", 821 Cmd("git checkout -f origin/candidates -- src/version.cc", "",
822 cb=self.WriteFakeVersionFile), 822 cb=self.WriteFakeVersionFile),
823 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "", 823 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "",
824 cb=CheckSVNCommit), 824 cb=CheckSVNCommit),
825 ] 825 ]
826 if manual: 826 if manual:
827 expectations.append(RL("Y")) # Sanity check. 827 expectations.append(RL("Y")) # Sanity check.
828 expectations += [ 828 expectations += [
829 Cmd("git svn dcommit 2>&1", ""), 829 Cmd("git svn dcommit 2>&1", ""),
830 Cmd("git fetch", ""), 830 Cmd("git fetch", ""),
831 Cmd("git log -1 --format=%H --grep=" 831 Cmd("git log -1 --format=%H --grep="
832 "\"Version 3.22.5 (based on push_hash)\"" 832 "\"Version 3.22.5 (based on push_hash)\""
833 " origin/candidates", "hsh_to_tag"), 833 " origin/candidates", "hsh_to_tag"),
834 Cmd("git tag 3.22.5 hsh_to_tag", ""), 834 Cmd("git tag 3.22.5 hsh_to_tag", ""),
835 Cmd("git push origin 3.22.5", ""), 835 Cmd("git push origin 3.22.5", ""),
836 Cmd("git checkout -f some_branch", ""), 836 Cmd("git checkout -f some_branch", ""),
837 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), 837 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
838 Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""), 838 Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""),
839 ] 839 ]
840 self.Expect(expectations) 840 self.Expect(expectations)
841 841
842 args = ["-a", "author@chromium.org", "--revision", "push_hash", 842 args = ["-a", "author@chromium.org", "--revision", "push_hash",
843 "--vc-interface", "git_read_svn_write",] 843 "--vc-interface", "git_read_svn_write",]
844 if force: args.append("-f") 844 if force: args.append("-f")
845 if manual: args.append("-m") 845 if manual: args.append("-m")
846 else: args += ["-r", "reviewer@chromium.org"] 846 else: args += ["-r", "reviewer@chromium.org"]
847 PushToTrunk(TEST_CONFIG, self).Run(args) 847 PushToTrunk(TEST_CONFIG, self).Run(args)
848 848
849 cl = FileToText(TEST_CONFIG["CHANGELOG_FILE"]) 849 cl = FileToText(os.path.join(TEST_CONFIG["DEFAULT_CWD"], CHANGELOG_FILE))
850 self.assertTrue(re.search(r"^\d\d\d\d\-\d+\-\d+: Version 3\.22\.5", cl)) 850 self.assertTrue(re.search(r"^\d\d\d\d\-\d+\-\d+: Version 3\.22\.5", cl))
851 self.assertTrue(re.search(r" Log text 1 \(issue 321\).", cl)) 851 self.assertTrue(re.search(r" Log text 1 \(issue 321\).", cl))
852 self.assertTrue(re.search(r"1999\-04\-05: Version 3\.22\.4", cl)) 852 self.assertTrue(re.search(r"1999\-04\-05: Version 3\.22\.4", cl))
853 853
854 # Note: The version file is on build number 5 again in the end of this test 854 # Note: The version file is on build number 5 again in the end of this test
855 # since the git command that merges to the bleeding edge branch is mocked 855 # since the git command that merges to the bleeding edge branch is mocked
856 # out. 856 # out.
857 857
858 def testPushToTrunkManual(self): 858 def testPushToTrunkManual(self):
859 self._PushToTrunk(manual=True) 859 self._PushToTrunk(manual=True)
860 860
861 def testPushToTrunkSemiAutomatic(self): 861 def testPushToTrunkSemiAutomatic(self):
862 self._PushToTrunk() 862 self._PushToTrunk()
863 863
864 def testPushToTrunkForced(self): 864 def testPushToTrunkForced(self):
865 self._PushToTrunk(force=True) 865 self._PushToTrunk(force=True)
866 866
867 def testPushToTrunkGit(self): 867 def testPushToTrunkGit(self):
868 svn_root = self.MakeEmptyTempDirectory() 868 svn_root = self.MakeEmptyTempDirectory()
869 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) 869 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git"))
870 870
871 # The version file on bleeding edge has build level 5, while the version 871 # The version file on bleeding edge has build level 5, while the version
872 # file from trunk has build level 4. 872 # file from trunk has build level 4.
873 self.WriteFakeVersionFile(build=5) 873 self.WriteFakeVersionFile(build=5)
874 874
875 TEST_CONFIG["CHANGELOG_ENTRY_FILE"] = self.MakeEmptyTempFile() 875 TEST_CONFIG["CHANGELOG_ENTRY_FILE"] = self.MakeEmptyTempFile()
876 TEST_CONFIG["CHANGELOG_FILE"] = self.MakeEmptyTempFile()
877 bleeding_edge_change_log = "2014-03-17: Sentinel\n" 876 bleeding_edge_change_log = "2014-03-17: Sentinel\n"
878 TextToFile(bleeding_edge_change_log, TEST_CONFIG["CHANGELOG_FILE"]) 877 TextToFile(bleeding_edge_change_log,
878 os.path.join(TEST_CONFIG["DEFAULT_CWD"], CHANGELOG_FILE))
879 879
880 def ResetChangeLog(): 880 def ResetChangeLog():
881 """On 'git co -b new_branch svn/trunk', and 'git checkout -- ChangeLog', 881 """On 'git co -b new_branch svn/trunk', and 'git checkout -- ChangeLog',
882 the ChangLog will be reset to its content on trunk.""" 882 the ChangLog will be reset to its content on trunk."""
883 trunk_change_log = """1999-04-05: Version 3.22.4 883 trunk_change_log = """1999-04-05: Version 3.22.4
884 884
885 Performance and stability improvements on all platforms.\n""" 885 Performance and stability improvements on all platforms.\n"""
886 TextToFile(trunk_change_log, TEST_CONFIG["CHANGELOG_FILE"]) 886 TextToFile(trunk_change_log,
887 os.path.join(TEST_CONFIG["DEFAULT_CWD"], CHANGELOG_FILE))
887 888
888 def ResetToTrunk(): 889 def ResetToTrunk():
889 ResetChangeLog() 890 ResetChangeLog()
890 self.WriteFakeVersionFile() 891 self.WriteFakeVersionFile()
891 892
892 def CheckSVNCommit(): 893 def CheckSVNCommit():
893 commit = FileToText(TEST_CONFIG["COMMITMSG_FILE"]) 894 commit = FileToText(TEST_CONFIG["COMMITMSG_FILE"])
894 self.assertEquals( 895 self.assertEquals(
895 """Version 3.22.5 (based on push_hash) 896 """Version 3.22.5 (based on push_hash)
896 897
897 Log text 1 (issue 321). 898 Log text 1 (issue 321).
898 899
899 Performance and stability improvements on all platforms.""", commit) 900 Performance and stability improvements on all platforms.""", commit)
900 version = FileToText( 901 version = FileToText(
901 os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE)) 902 os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE))
902 self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version)) 903 self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version))
903 self.assertTrue(re.search(r"#define BUILD_NUMBER\s+5", version)) 904 self.assertTrue(re.search(r"#define BUILD_NUMBER\s+5", version))
904 self.assertFalse(re.search(r"#define BUILD_NUMBER\s+6", version)) 905 self.assertFalse(re.search(r"#define BUILD_NUMBER\s+6", version))
905 self.assertTrue(re.search(r"#define PATCH_LEVEL\s+0", version)) 906 self.assertTrue(re.search(r"#define PATCH_LEVEL\s+0", version))
906 self.assertTrue(re.search(r"#define IS_CANDIDATE_VERSION\s+0", version)) 907 self.assertTrue(re.search(r"#define IS_CANDIDATE_VERSION\s+0", version))
907 908
908 # Check that the change log on the trunk branch got correctly modified. 909 # Check that the change log on the trunk branch got correctly modified.
909 change_log = FileToText(TEST_CONFIG["CHANGELOG_FILE"]) 910 change_log = FileToText(
911 os.path.join(TEST_CONFIG["DEFAULT_CWD"], CHANGELOG_FILE))
910 self.assertEquals( 912 self.assertEquals(
911 """1999-07-31: Version 3.22.5 913 """1999-07-31: Version 3.22.5
912 914
913 Log text 1 (issue 321). 915 Log text 1 (issue 321).
914 916
915 Performance and stability improvements on all platforms. 917 Performance and stability improvements on all platforms.
916 918
917 919
918 1999-04-05: Version 3.22.4 920 1999-04-05: Version 3.22.4
919 921
(...skipping 22 matching lines...) Expand all
942 Cmd("git log --format=%H abc3..push_hash", "rev1\n"), 944 Cmd("git log --format=%H abc3..push_hash", "rev1\n"),
943 Cmd("git log -1 --format=%s rev1", "Log text 1.\n"), 945 Cmd("git log -1 --format=%s rev1", "Log text 1.\n"),
944 Cmd("git log -1 --format=%B rev1", "Text\nLOG=YES\nBUG=v8:321\nText\n"), 946 Cmd("git log -1 --format=%B rev1", "Text\nLOG=YES\nBUG=v8:321\nText\n"),
945 Cmd("git log -1 --format=%an rev1", "author1@chromium.org\n"), 947 Cmd("git log -1 --format=%an rev1", "author1@chromium.org\n"),
946 Cmd("git fetch", ""), 948 Cmd("git fetch", ""),
947 Cmd("git checkout -f origin/master", ""), 949 Cmd("git checkout -f origin/master", ""),
948 Cmd("git diff origin/candidates push_hash", "patch content\n"), 950 Cmd("git diff origin/candidates push_hash", "patch content\n"),
949 Cmd(("git new-branch %s --upstream origin/candidates" % 951 Cmd(("git new-branch %s --upstream origin/candidates" %
950 TEST_CONFIG["TRUNKBRANCH"]), "", cb=ResetToTrunk), 952 TEST_CONFIG["TRUNKBRANCH"]), "", cb=ResetToTrunk),
951 Cmd("git apply --index --reject \"%s\"" % TEST_CONFIG["PATCH_FILE"], ""), 953 Cmd("git apply --index --reject \"%s\"" % TEST_CONFIG["PATCH_FILE"], ""),
952 Cmd(("git checkout -f origin/candidates -- %s" % 954 Cmd("git checkout -f origin/candidates -- ChangeLog", "",
953 TEST_CONFIG["CHANGELOG_FILE"]), "",
954 cb=ResetChangeLog), 955 cb=ResetChangeLog),
955 Cmd("git checkout -f origin/candidates -- src/version.cc", "", 956 Cmd("git checkout -f origin/candidates -- src/version.cc", "",
956 cb=self.WriteFakeVersionFile), 957 cb=self.WriteFakeVersionFile),
957 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "", 958 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "",
958 cb=CheckSVNCommit), 959 cb=CheckSVNCommit),
959 # TODO(machenbach): Change test to pure git after flag day. 960 # TODO(machenbach): Change test to pure git after flag day.
960 # Cmd("git push origin", ""), 961 # Cmd("git push origin", ""),
961 Cmd("git diff HEAD^ HEAD", "patch content"), 962 Cmd("git diff HEAD^ HEAD", "patch content"),
962 Cmd("svn update", "", cwd=svn_root), 963 Cmd("svn update", "", cwd=svn_root),
963 Cmd("svn status", "", cwd=svn_root), 964 Cmd("svn status", "", cwd=svn_root),
(...skipping 18 matching lines...) Expand all
982 Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""), 983 Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""),
983 ] 984 ]
984 self.Expect(expectations) 985 self.Expect(expectations)
985 986
986 args = ["-a", "author@chromium.org", "--revision", "push_hash", 987 args = ["-a", "author@chromium.org", "--revision", "push_hash",
987 "--vc-interface", "git", "-f", "-r", "reviewer@chromium.org", 988 "--vc-interface", "git", "-f", "-r", "reviewer@chromium.org",
988 "--svn", svn_root, "--svn-config", "[CONFIG_DIR]", 989 "--svn", svn_root, "--svn-config", "[CONFIG_DIR]",
989 "--work-dir", TEST_CONFIG["DEFAULT_CWD"]] 990 "--work-dir", TEST_CONFIG["DEFAULT_CWD"]]
990 PushToTrunk(TEST_CONFIG, self).Run(args) 991 PushToTrunk(TEST_CONFIG, self).Run(args)
991 992
992 cl = FileToText(TEST_CONFIG["CHANGELOG_FILE"]) 993 cl = FileToText(os.path.join(TEST_CONFIG["DEFAULT_CWD"], CHANGELOG_FILE))
993 self.assertTrue(re.search(r"^\d\d\d\d\-\d+\-\d+: Version 3\.22\.5", cl)) 994 self.assertTrue(re.search(r"^\d\d\d\d\-\d+\-\d+: Version 3\.22\.5", cl))
994 self.assertTrue(re.search(r" Log text 1 \(issue 321\).", cl)) 995 self.assertTrue(re.search(r" Log text 1 \(issue 321\).", cl))
995 self.assertTrue(re.search(r"1999\-04\-05: Version 3\.22\.4", cl)) 996 self.assertTrue(re.search(r"1999\-04\-05: Version 3\.22\.4", cl))
996 997
997 # Note: The version file is on build number 5 again in the end of this test 998 # Note: The version file is on build number 5 again in the end of this test
998 # since the git command that merges to the bleeding edge branch is mocked 999 # since the git command that merges to the bleeding edge branch is mocked
999 # out. 1000 # out.
1000 1001
1001 C_V8_22624_LOG = """V8 CL. 1002 C_V8_22624_LOG = """V8 CL.
1002 1003
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 1732
1732 Review URL: https://codereview.chromium.org/83173002 1733 Review URL: https://codereview.chromium.org/83173002
1733 1734
1734 ------------------------------------------------------------------------""") 1735 ------------------------------------------------------------------------""")
1735 self.assertEquals( 1736 self.assertEquals(
1736 """Prepare push to trunk. Now working on version 3.23.11. 1737 """Prepare push to trunk. Now working on version 3.23.11.
1737 1738
1738 R=danno@chromium.org 1739 R=danno@chromium.org
1739 1740
1740 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1741 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body)
OLDNEW
« no previous file with comments | « tools/push-to-trunk/push_to_trunk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698