| 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line", | 860 TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line", |
| 861 os.path.join(chrome_dir, "DEPS")) | 861 os.path.join(chrome_dir, "DEPS")) |
| 862 def WriteDeps(): | 862 def WriteDeps(): |
| 863 TextToFile("Some line\n \"v8_revision\": \"22624\",\n some line", | 863 TextToFile("Some line\n \"v8_revision\": \"22624\",\n some line", |
| 864 os.path.join(chrome_dir, "DEPS")) | 864 os.path.join(chrome_dir, "DEPS")) |
| 865 | 865 |
| 866 expectations = [ | 866 expectations = [ |
| 867 Cmd("git fetch origin", ""), | 867 Cmd("git fetch origin", ""), |
| 868 Cmd(("git log -1 --format=%H --grep=" | 868 Cmd(("git log -1 --format=%H --grep=" |
| 869 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " | 869 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " |
| 870 "origin/master"), "push_hash\n"), | 870 "origin/candidates"), "push_hash\n"), |
| 871 Cmd("git log -1 --format=%B push_hash", self.C_V8_22624_LOG), | 871 Cmd("git log -1 --format=%B push_hash", self.C_V8_22624_LOG), |
| 872 Cmd("git log -1 --format=%s push_hash", | 872 Cmd("git log -1 --format=%s push_hash", |
| 873 "Version 3.22.5 (based on bleeding_edge revision r22622)\n"), | 873 "Version 3.22.5 (based on bleeding_edge revision r22622)\n"), |
| 874 URL("https://chromium-build.appspot.com/p/chromium/sheriff_v8.js", | 874 URL("https://chromium-build.appspot.com/p/chromium/sheriff_v8.js", |
| 875 "document.write('g_name')"), | 875 "document.write('g_name')"), |
| 876 Cmd("git status -s -uno", "", cwd=chrome_dir), | 876 Cmd("git status -s -uno", "", cwd=chrome_dir), |
| 877 Cmd("git checkout -f master", "", cwd=chrome_dir), | 877 Cmd("git checkout -f master", "", cwd=chrome_dir), |
| 878 Cmd("gclient sync --nohooks", "syncing...", cwd=chrome_dir), | 878 Cmd("gclient sync --nohooks", "syncing...", cwd=chrome_dir), |
| 879 Cmd("git pull", "", cwd=chrome_dir), | 879 Cmd("git pull", "", cwd=chrome_dir), |
| 880 Cmd("git fetch origin", ""), | 880 Cmd("git fetch origin", ""), |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 | 998 |
| 999 def testAutoRollUpToDate(self): | 999 def testAutoRollUpToDate(self): |
| 1000 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() | 1000 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() |
| 1001 TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS")) | 1001 TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS")) |
| 1002 self.Expect([ | 1002 self.Expect([ |
| 1003 URL("https://codereview.chromium.org/search", | 1003 URL("https://codereview.chromium.org/search", |
| 1004 "owner=author%40chromium.org&limit=30&closed=3&format=json", | 1004 "owner=author%40chromium.org&limit=30&closed=3&format=json", |
| 1005 ("{\"results\": [{\"subject\": \"different\"}]}")), | 1005 ("{\"results\": [{\"subject\": \"different\"}]}")), |
| 1006 Cmd(("git log -1 --format=%H --grep=" | 1006 Cmd(("git log -1 --format=%H --grep=" |
| 1007 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " | 1007 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " |
| 1008 "origin/master"), "push_hash\n"), | 1008 "origin/candidates"), "push_hash\n"), |
| 1009 Cmd("git log -1 --format=%B push_hash", self.C_V8_22624_LOG), | 1009 Cmd("git log -1 --format=%B push_hash", self.C_V8_22624_LOG), |
| 1010 Cmd("git log -1 --format=%B abcd123455", self.C_V8_123455_LOG), | 1010 Cmd("git log -1 --format=%B abcd123455", self.C_V8_123455_LOG), |
| 1011 ]) | 1011 ]) |
| 1012 | 1012 |
| 1013 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( | 1013 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( |
| 1014 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"]]) | 1014 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"]]) |
| 1015 self.assertEquals(0, result) | 1015 self.assertEquals(0, result) |
| 1016 | 1016 |
| 1017 def testAutoRoll(self): | 1017 def testAutoRoll(self): |
| 1018 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() | 1018 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() |
| 1019 TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS")) | 1019 TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS")) |
| 1020 TEST_CONFIG["CLUSTERFUZZ_API_KEY_FILE"] = self.MakeEmptyTempFile() | 1020 TEST_CONFIG["CLUSTERFUZZ_API_KEY_FILE"] = self.MakeEmptyTempFile() |
| 1021 TextToFile("fake key", TEST_CONFIG["CLUSTERFUZZ_API_KEY_FILE"]) | 1021 TextToFile("fake key", TEST_CONFIG["CLUSTERFUZZ_API_KEY_FILE"]) |
| 1022 | 1022 |
| 1023 self.Expect([ | 1023 self.Expect([ |
| 1024 URL("https://codereview.chromium.org/search", | 1024 URL("https://codereview.chromium.org/search", |
| 1025 "owner=author%40chromium.org&limit=30&closed=3&format=json", | 1025 "owner=author%40chromium.org&limit=30&closed=3&format=json", |
| 1026 ("{\"results\": [{\"subject\": \"different\"}]}")), | 1026 ("{\"results\": [{\"subject\": \"different\"}]}")), |
| 1027 Cmd(("git log -1 --format=%H --grep=" | 1027 Cmd(("git log -1 --format=%H --grep=" |
| 1028 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " | 1028 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " |
| 1029 "origin/master"), "push_hash\n"), | 1029 "origin/candidates"), "push_hash\n"), |
| 1030 Cmd("git log -1 --format=%B push_hash", self.C_V8_123456_LOG), | 1030 Cmd("git log -1 --format=%B push_hash", self.C_V8_123456_LOG), |
| 1031 Cmd("git log -1 --format=%B abcd123455", self.C_V8_123455_LOG), | 1031 Cmd("git log -1 --format=%B abcd123455", self.C_V8_123455_LOG), |
| 1032 ]) | 1032 ]) |
| 1033 | 1033 |
| 1034 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( | 1034 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( |
| 1035 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"], "--roll"]) | 1035 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"], "--roll"]) |
| 1036 self.assertEquals(0, result) | 1036 self.assertEquals(0, result) |
| 1037 | 1037 |
| 1038 def testMergeToBranch(self): | 1038 def testMergeToBranch(self): |
| 1039 TEST_CONFIG["ALREADY_MERGING_SENTINEL_FILE"] = self.MakeEmptyTempFile() | 1039 TEST_CONFIG["ALREADY_MERGING_SENTINEL_FILE"] = self.MakeEmptyTempFile() |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 | 1540 |
| 1541 Review URL: https://codereview.chromium.org/83173002 | 1541 Review URL: https://codereview.chromium.org/83173002 |
| 1542 | 1542 |
| 1543 ------------------------------------------------------------------------""") | 1543 ------------------------------------------------------------------------""") |
| 1544 self.assertEquals( | 1544 self.assertEquals( |
| 1545 """Prepare push to trunk. Now working on version 3.23.11. | 1545 """Prepare push to trunk. Now working on version 3.23.11. |
| 1546 | 1546 |
| 1547 R=danno@chromium.org | 1547 R=danno@chromium.org |
| 1548 | 1548 |
| 1549 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1549 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
| OLD | NEW |