| 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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1008 Summary of changes available at: | 1008 Summary of changes available at: |
| 1009 https://chromium.googlesource.com/v8/v8/+log/last_rol..roll_hsh | 1009 https://chromium.googlesource.com/v8/v8/+log/last_rol..roll_hsh |
| 1010 | 1010 |
| 1011 Please follow these instructions for assigning/CC'ing issues: | 1011 Please follow these instructions for assigning/CC'ing issues: |
| 1012 https://code.google.com/p/v8-wiki/wiki/TriagingIssues | 1012 https://code.google.com/p/v8-wiki/wiki/TriagingIssues |
| 1013 | 1013 |
| 1014 Please close rolling in case of a roll revert: | 1014 Please close rolling in case of a roll revert: |
| 1015 https://v8-roll.appspot.com/ | 1015 https://v8-roll.appspot.com/ |
| 1016 This only works with a Google account. | 1016 This only works with a Google account. |
| 1017 | 1017 |
| 1018 TBR=g_name@chromium.org,reviewer@chromium.org""" | 1018 TBR=reviewer@chromium.org""" |
| 1019 | 1019 |
| 1020 def testChromiumRoll(self): | 1020 def testChromiumRoll(self): |
| 1021 # Setup fake directory structures. | 1021 # Setup fake directory structures. |
| 1022 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() | 1022 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() |
| 1023 TextToFile("", os.path.join(TEST_CONFIG["CHROMIUM"], ".git")) | 1023 TextToFile("", os.path.join(TEST_CONFIG["CHROMIUM"], ".git")) |
| 1024 chrome_dir = TEST_CONFIG["CHROMIUM"] | 1024 chrome_dir = TEST_CONFIG["CHROMIUM"] |
| 1025 os.makedirs(os.path.join(chrome_dir, "v8")) | 1025 os.makedirs(os.path.join(chrome_dir, "v8")) |
| 1026 | 1026 |
| 1027 # Write fake deps file. | 1027 # Write fake deps file. |
| 1028 TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line", | 1028 TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line", |
| 1029 os.path.join(chrome_dir, "DEPS")) | 1029 os.path.join(chrome_dir, "DEPS")) |
| 1030 def WriteDeps(): | 1030 def WriteDeps(): |
| 1031 TextToFile("Some line\n \"v8_revision\": \"22624\",\n some line", | 1031 TextToFile("Some line\n \"v8_revision\": \"22624\",\n some line", |
| 1032 os.path.join(chrome_dir, "DEPS")) | 1032 os.path.join(chrome_dir, "DEPS")) |
| 1033 | 1033 |
| 1034 expectations = [ | 1034 expectations = [ |
| 1035 Cmd("git fetch origin", ""), | 1035 Cmd("git fetch origin", ""), |
| 1036 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), | 1036 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), |
| 1037 Cmd("git log -1 --format=%s roll_hsh", | 1037 Cmd("git log -1 --format=%s roll_hsh", |
| 1038 "Version 3.22.4 (based on abc)\n"), | 1038 "Version 3.22.4 (based on abc)\n"), |
| 1039 Cmd("git describe --tags roll_hsh", "3.22.4"), | 1039 Cmd("git describe --tags roll_hsh", "3.22.4"), |
| 1040 Cmd("git describe --tags last_roll_hsh", "3.22.2.1"), | 1040 Cmd("git describe --tags last_roll_hsh", "3.22.2.1"), |
| 1041 URL("https://chromium-build.appspot.com/p/chromium/sheriff_v8.js", | |
| 1042 "document.write('g_name')"), | |
| 1043 Cmd("git status -s -uno", "", cwd=chrome_dir), | 1041 Cmd("git status -s -uno", "", cwd=chrome_dir), |
| 1044 Cmd("git checkout -f master", "", cwd=chrome_dir), | 1042 Cmd("git checkout -f master", "", cwd=chrome_dir), |
| 1045 Cmd("git branch", "", cwd=chrome_dir), | 1043 Cmd("git branch", "", cwd=chrome_dir), |
| 1046 Cmd("gclient sync --nohooks", "syncing...", cwd=chrome_dir), | 1044 Cmd("gclient sync --nohooks", "syncing...", cwd=chrome_dir), |
| 1047 Cmd("git pull", "", cwd=chrome_dir), | 1045 Cmd("git pull", "", cwd=chrome_dir), |
| 1048 Cmd("git fetch origin", ""), | 1046 Cmd("git fetch origin", ""), |
| 1049 Cmd("git new-branch work-branch", "", cwd=chrome_dir), | 1047 Cmd("git new-branch work-branch", "", cwd=chrome_dir), |
| 1050 Cmd("roll-dep-svn v8 roll_hsh", "rolled", cb=WriteDeps, cwd=chrome_dir), | 1048 Cmd("roll-dep-svn v8 roll_hsh", "rolled", cb=WriteDeps, cwd=chrome_dir), |
| 1051 Cmd(("git commit -am \"%s\" " | 1049 Cmd(("git commit -am \"%s\" " |
| 1052 "--author \"author@chromium.org <author@chromium.org>\"" % | 1050 "--author \"author@chromium.org <author@chromium.org>\"" % |
| 1053 self.ROLL_COMMIT_MSG), | 1051 self.ROLL_COMMIT_MSG), |
| 1054 "", cwd=chrome_dir), | 1052 "", cwd=chrome_dir), |
| 1055 Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f", "", | 1053 Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f", "", |
| 1056 cwd=chrome_dir), | 1054 cwd=chrome_dir), |
| 1057 Cmd("git checkout -f master", "", cwd=chrome_dir), | 1055 Cmd("git checkout -f master", "", cwd=chrome_dir), |
| 1058 Cmd("git branch -D work-branch", "", cwd=chrome_dir), | 1056 Cmd("git branch -D work-branch", "", cwd=chrome_dir), |
| 1059 ] | 1057 ] |
| 1060 self.Expect(expectations) | 1058 self.Expect(expectations) |
| 1061 | 1059 |
| 1062 args = ["-a", "author@chromium.org", "-c", chrome_dir, | 1060 args = ["-a", "author@chromium.org", "-c", chrome_dir, |
| 1063 "--sheriff", | |
| 1064 "-r", "reviewer@chromium.org", | 1061 "-r", "reviewer@chromium.org", |
| 1065 "--last-roll", "last_roll_hsh", | 1062 "--last-roll", "last_roll_hsh", |
| 1066 "roll_hsh"] | 1063 "roll_hsh"] |
| 1067 ChromiumRoll(TEST_CONFIG, self).Run(args) | 1064 ChromiumRoll(TEST_CONFIG, self).Run(args) |
| 1068 | 1065 |
| 1069 deps = FileToText(os.path.join(chrome_dir, "DEPS")) | 1066 deps = FileToText(os.path.join(chrome_dir, "DEPS")) |
| 1070 self.assertTrue(re.search("\"v8_revision\": \"22624\"", deps)) | 1067 self.assertTrue(re.search("\"v8_revision\": \"22624\"", deps)) |
| 1071 | 1068 |
| 1072 def testCheckLastPushRecently(self): | 1069 def testCheckLastPushRecently(self): |
| 1073 self.Expect([ | 1070 self.Expect([ |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1553 | 1550 |
| 1554 Review URL: https://codereview.chromium.org/83173002 | 1551 Review URL: https://codereview.chromium.org/83173002 |
| 1555 | 1552 |
| 1556 ------------------------------------------------------------------------""") | 1553 ------------------------------------------------------------------------""") |
| 1557 self.assertEquals( | 1554 self.assertEquals( |
| 1558 """Prepare push to trunk. Now working on version 3.23.11. | 1555 """Prepare push to trunk. Now working on version 3.23.11. |
| 1559 | 1556 |
| 1560 R=danno@chromium.org | 1557 R=danno@chromium.org |
| 1561 | 1558 |
| 1562 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1559 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
| OLD | NEW |