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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line", | 777 TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line", |
778 TEST_CONFIG[DEPS_FILE]) | 778 TEST_CONFIG[DEPS_FILE]) |
779 | 779 |
780 os.environ["EDITOR"] = "vi" | 780 os.environ["EDITOR"] = "vi" |
781 force_flag = " -f" if not manual else "" | 781 force_flag = " -f" if not manual else "" |
782 self.ExpectGit([ | 782 self.ExpectGit([ |
783 Git("status -s -uno", ""), | 783 Git("status -s -uno", ""), |
784 Git("status -s -b -uno", "## some_branch\n"), | 784 Git("status -s -b -uno", "## some_branch\n"), |
785 Git("svn fetch", ""), | 785 Git("svn fetch", ""), |
786 Git(("log -1 --format=%H --grep=" | 786 Git(("log -1 --format=%H --grep=" |
787 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" " | 787 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " |
788 "svn/trunk"), "push_hash\n"), | 788 "svn/trunk"), "push_hash\n"), |
789 Git("svn find-rev push_hash", "123455\n"), | 789 Git("svn find-rev push_hash", "123455\n"), |
790 Git("log -1 --format=%s push_hash", | 790 Git("log -1 --format=%s push_hash", |
791 "Version 3.22.5 (based on bleeding_edge revision r123454)\n"), | 791 "Version 3.22.5 (based on bleeding_edge revision r123454)\n"), |
792 Git("status -s -uno", ""), | 792 Git("status -s -uno", ""), |
793 Git("checkout -f master", ""), | 793 Git("checkout -f master", ""), |
794 Git("pull", ""), | 794 Git("pull", ""), |
795 Git("checkout -b v8-roll-123455", ""), | 795 Git("checkout -b v8-roll-123455", ""), |
796 Git(("commit -am \"Update V8 to version 3.22.5 " | 796 Git(("commit -am \"Update V8 to version 3.22.5 " |
797 "(based on bleeding_edge revision r123454).\n\n" | 797 "(based on bleeding_edge revision r123454).\n\n" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 self.ExpectReadURL([ | 937 self.ExpectReadURL([ |
938 URL("https://codereview.chromium.org/search", | 938 URL("https://codereview.chromium.org/search", |
939 "owner=author%40chromium.org&limit=30&closed=3&format=json", | 939 "owner=author%40chromium.org&limit=30&closed=3&format=json", |
940 ("{\"results\": [{\"subject\": \"different\"}]}")), | 940 ("{\"results\": [{\"subject\": \"different\"}]}")), |
941 URL("http://src.chromium.org/svn/trunk/src/DEPS", | 941 URL("http://src.chromium.org/svn/trunk/src/DEPS", |
942 self.FAKE_DEPS), | 942 self.FAKE_DEPS), |
943 ]) | 943 ]) |
944 | 944 |
945 self.ExpectGit([ | 945 self.ExpectGit([ |
946 Git(("log -1 --format=%H --grep=" | 946 Git(("log -1 --format=%H --grep=" |
947 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" " | 947 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " |
948 "svn/trunk"), "push_hash\n"), | 948 "svn/trunk"), "push_hash\n"), |
949 Git("svn find-rev push_hash", "123455\n"), | 949 Git("svn find-rev push_hash", "123455\n"), |
950 ]) | 950 ]) |
951 | 951 |
952 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( | 952 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( |
953 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG[CHROMIUM]]) | 953 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG[CHROMIUM]]) |
954 self.assertEquals(1, result) | 954 self.assertEquals(1, result) |
955 | 955 |
956 def testAutoRoll(self): | 956 def testAutoRoll(self): |
957 self.ExpectReadURL([ | 957 self.ExpectReadURL([ |
958 URL("https://codereview.chromium.org/search", | 958 URL("https://codereview.chromium.org/search", |
959 "owner=author%40chromium.org&limit=30&closed=3&format=json", | 959 "owner=author%40chromium.org&limit=30&closed=3&format=json", |
960 ("{\"results\": [{\"subject\": \"different\"}]}")), | 960 ("{\"results\": [{\"subject\": \"different\"}]}")), |
961 URL("http://src.chromium.org/svn/trunk/src/DEPS", | 961 URL("http://src.chromium.org/svn/trunk/src/DEPS", |
962 self.FAKE_DEPS), | 962 self.FAKE_DEPS), |
963 ]) | 963 ]) |
964 | 964 |
965 self.ExpectGit([ | 965 self.ExpectGit([ |
966 Git(("log -1 --format=%H --grep=" | 966 Git(("log -1 --format=%H --grep=" |
967 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" " | 967 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " |
968 "svn/trunk"), "push_hash\n"), | 968 "svn/trunk"), "push_hash\n"), |
969 Git("svn find-rev push_hash", "123456\n"), | 969 Git("svn find-rev push_hash", "123456\n"), |
970 ]) | 970 ]) |
971 | 971 |
972 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( | 972 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( |
973 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG[CHROMIUM], "--roll"]) | 973 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG[CHROMIUM], "--roll"]) |
974 self.assertEquals(0, result) | 974 self.assertEquals(0, result) |
975 | 975 |
976 def testMergeToBranch(self): | 976 def testMergeToBranch(self): |
977 TEST_CONFIG[ALREADY_MERGING_SENTINEL_FILE] = self.MakeEmptyTempFile() | 977 TEST_CONFIG[ALREADY_MERGING_SENTINEL_FILE] = self.MakeEmptyTempFile() |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1117 | 1117 |
1118 Review URL: https://codereview.chromium.org/83173002 | 1118 Review URL: https://codereview.chromium.org/83173002 |
1119 | 1119 |
1120 ------------------------------------------------------------------------""") | 1120 ------------------------------------------------------------------------""") |
1121 self.assertEquals( | 1121 self.assertEquals( |
1122 """Prepare push to trunk. Now working on version 3.23.11. | 1122 """Prepare push to trunk. Now working on version 3.23.11. |
1123 | 1123 |
1124 R=danno@chromium.org | 1124 R=danno@chromium.org |
1125 | 1125 |
1126 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1126 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
OLD | NEW |