| 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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@123455 123 | 982 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@123455 123 |
| 983 | 983 |
| 984 """ | 984 """ |
| 985 | 985 |
| 986 C_V8_123456_LOG = """V8 CL. | 986 C_V8_123456_LOG = """V8 CL. |
| 987 | 987 |
| 988 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@123456 123 | 988 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@123456 123 |
| 989 | 989 |
| 990 """ | 990 """ |
| 991 | 991 |
| 992 ROLL_COMMIT_MSG = """Update V8 to version 3.22.4 (based on abc). |
| 993 |
| 994 Summary of changes available at: |
| 995 https://chromium.googlesource.com/v8/v8/+log/last_rol..abc |
| 996 |
| 997 Please assign any issues to the V8 specialty sheriffs of one of the |
| 998 following categories: |
| 999 |
| 1000 Stability: jkummerow@chromium.org |
| 1001 Performance: bmeurer@chromium.org, mvstanton@chromium.org |
| 1002 Clusterfuzz: jarin@chromium.org, mstarzinger@chromium.org |
| 1003 |
| 1004 Please CC hablich@chromium.org on all issues. |
| 1005 |
| 1006 Assign remaining issues to the V8 sheriff g_name@chromium.org |
| 1007 |
| 1008 TBR=g_name@chromium.org,reviewer@chromium.org""" |
| 1009 |
| 992 def testChromiumRoll(self): | 1010 def testChromiumRoll(self): |
| 993 googlers_mapping_py = "%s-mapping.py" % TEST_CONFIG["PERSISTFILE_BASENAME"] | |
| 994 with open(googlers_mapping_py, "w") as f: | |
| 995 f.write(""" | |
| 996 def list_to_dict(entries): | |
| 997 return {"g_name@google.com": "c_name@chromium.org"} | |
| 998 def get_list(): | |
| 999 pass""") | |
| 1000 | |
| 1001 # Setup fake directory structures. | 1011 # Setup fake directory structures. |
| 1002 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() | 1012 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() |
| 1003 TextToFile("", os.path.join(TEST_CONFIG["CHROMIUM"], ".git")) | 1013 TextToFile("", os.path.join(TEST_CONFIG["CHROMIUM"], ".git")) |
| 1004 chrome_dir = TEST_CONFIG["CHROMIUM"] | 1014 chrome_dir = TEST_CONFIG["CHROMIUM"] |
| 1005 os.makedirs(os.path.join(chrome_dir, "v8")) | 1015 os.makedirs(os.path.join(chrome_dir, "v8")) |
| 1006 | 1016 |
| 1007 # Write fake deps file. | 1017 # Write fake deps file. |
| 1008 TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line", | 1018 TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line", |
| 1009 os.path.join(chrome_dir, "DEPS")) | 1019 os.path.join(chrome_dir, "DEPS")) |
| 1010 def WriteDeps(): | 1020 def WriteDeps(): |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1028 "last_roll_master_hash"), | 1038 "last_roll_master_hash"), |
| 1029 URL("https://chromium-build.appspot.com/p/chromium/sheriff_v8.js", | 1039 URL("https://chromium-build.appspot.com/p/chromium/sheriff_v8.js", |
| 1030 "document.write('g_name')"), | 1040 "document.write('g_name')"), |
| 1031 Cmd("git status -s -uno", "", cwd=chrome_dir), | 1041 Cmd("git status -s -uno", "", cwd=chrome_dir), |
| 1032 Cmd("git checkout -f master", "", cwd=chrome_dir), | 1042 Cmd("git checkout -f master", "", cwd=chrome_dir), |
| 1033 Cmd("gclient sync --nohooks", "syncing...", cwd=chrome_dir), | 1043 Cmd("gclient sync --nohooks", "syncing...", cwd=chrome_dir), |
| 1034 Cmd("git pull", "", cwd=chrome_dir), | 1044 Cmd("git pull", "", cwd=chrome_dir), |
| 1035 Cmd("git fetch origin", ""), | 1045 Cmd("git fetch origin", ""), |
| 1036 Cmd("git new-branch v8-roll-push_hash", "", cwd=chrome_dir), | 1046 Cmd("git new-branch v8-roll-push_hash", "", cwd=chrome_dir), |
| 1037 Cmd("roll-dep v8 push_hash", "rolled", cb=WriteDeps, cwd=chrome_dir), | 1047 Cmd("roll-dep v8 push_hash", "rolled", cb=WriteDeps, cwd=chrome_dir), |
| 1038 Cmd(("git commit -am \"Update V8 to version 3.22.4 " | 1048 Cmd(("git commit -am \"%s\" " |
| 1039 "(based on abc).\n\n" | 1049 "--author \"author@chromium.org <author@chromium.org>\"" % |
| 1040 "Summary of changes available at:\n" | 1050 self.ROLL_COMMIT_MSG), |
| 1041 "https://chromium.googlesource.com/v8/v8/+log/last_rol..abc\n\n" | |
| 1042 "Please reply to the V8 sheriff c_name@chromium.org in " | |
| 1043 "case of problems.\n\nTBR=c_name@chromium.org\" " | |
| 1044 "--author \"author@chromium.org <author@chromium.org>\""), | |
| 1045 "", cwd=chrome_dir), | 1051 "", cwd=chrome_dir), |
| 1046 Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f", "", | 1052 Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f", "", |
| 1047 cwd=chrome_dir), | 1053 cwd=chrome_dir), |
| 1048 ] | 1054 ] |
| 1049 self.Expect(expectations) | 1055 self.Expect(expectations) |
| 1050 | 1056 |
| 1051 args = ["-a", "author@chromium.org", "-c", chrome_dir, | 1057 args = ["-a", "author@chromium.org", "-c", chrome_dir, |
| 1052 "--sheriff", "--googlers-mapping", googlers_mapping_py, | 1058 "--sheriff", |
| 1053 "-r", "reviewer@chromium.org", | 1059 "-r", "reviewer@chromium.org", |
| 1054 "--last-roll", "last_roll_hsh"] | 1060 "--last-roll", "last_roll_hsh"] |
| 1055 ChromiumRoll(TEST_CONFIG, self).Run(args) | 1061 ChromiumRoll(TEST_CONFIG, self).Run(args) |
| 1056 | 1062 |
| 1057 deps = FileToText(os.path.join(chrome_dir, "DEPS")) | 1063 deps = FileToText(os.path.join(chrome_dir, "DEPS")) |
| 1058 self.assertTrue(re.search("\"v8_revision\": \"22624\"", deps)) | 1064 self.assertTrue(re.search("\"v8_revision\": \"22624\"", deps)) |
| 1059 | 1065 |
| 1060 def testCheckLastPushRecently(self): | 1066 def testCheckLastPushRecently(self): |
| 1061 self.Expect([ | 1067 self.Expect([ |
| 1062 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), | 1068 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 | 1555 |
| 1550 Review URL: https://codereview.chromium.org/83173002 | 1556 Review URL: https://codereview.chromium.org/83173002 |
| 1551 | 1557 |
| 1552 ------------------------------------------------------------------------""") | 1558 ------------------------------------------------------------------------""") |
| 1553 self.assertEquals( | 1559 self.assertEquals( |
| 1554 """Prepare push to trunk. Now working on version 3.23.11. | 1560 """Prepare push to trunk. Now working on version 3.23.11. |
| 1555 | 1561 |
| 1556 R=danno@chromium.org | 1562 R=danno@chromium.org |
| 1557 | 1563 |
| 1558 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1564 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
| OLD | NEW |