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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 Git("checkout -b %s" % TEST_CONFIG[TEMP_BRANCH], ""), | 1180 Git("checkout -b %s" % TEST_CONFIG[TEMP_BRANCH], ""), |
1181 Git("branch", " branch1\n* branch2\n"), | 1181 Git("branch", " branch1\n* branch2\n"), |
1182 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""), | 1182 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""), |
1183 Git("branch -r", " svn/3.21\n svn/3.3\n"), | 1183 Git("branch -r", " svn/3.21\n svn/3.3\n"), |
1184 Git("reset --hard svn/3.3", ""), | 1184 Git("reset --hard svn/3.3", ""), |
1185 Git("log --format=%H", "hash1\nhash2"), | 1185 Git("log --format=%H", "hash1\nhash2"), |
1186 Git("diff --name-only hash1 hash1^", ""), | 1186 Git("diff --name-only hash1 hash1^", ""), |
1187 Git("diff --name-only hash2 hash2^", TEST_CONFIG[VERSION_FILE]), | 1187 Git("diff --name-only hash2 hash2^", TEST_CONFIG[VERSION_FILE]), |
1188 Git("checkout -f hash2 -- %s" % TEST_CONFIG[VERSION_FILE], "", | 1188 Git("checkout -f hash2 -- %s" % TEST_CONFIG[VERSION_FILE], "", |
1189 cb=ResetVersion(3, 1, 1)), | 1189 cb=ResetVersion(3, 1, 1)), |
1190 Git("log -1 --format=%B hash2", "Version 3.3.1.1 (merged 12)"), | 1190 Git("log -1 --format=%B hash2", |
| 1191 "Version 3.3.1.1 (merged 12)\n\nReview URL: fake.com\n"), |
1191 Git("log -1 --format=%s hash2", ""), | 1192 Git("log -1 --format=%s hash2", ""), |
1192 Git("svn find-rev hash2", "234"), | 1193 Git("svn find-rev hash2", "234"), |
1193 Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "", | 1194 Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "", |
1194 cb=ResetVersion(22, 5)), | 1195 cb=ResetVersion(22, 5)), |
1195 Git("reset --hard svn/3.21", ""), | 1196 Git("reset --hard svn/3.21", ""), |
1196 Git("log --format=%H", "hash3\nhash4\nhash5\n"), | 1197 Git("log --format=%H", "hash3\nhash4\nhash5\n"), |
1197 Git("diff --name-only hash3 hash3^", TEST_CONFIG[VERSION_FILE]), | 1198 Git("diff --name-only hash3 hash3^", TEST_CONFIG[VERSION_FILE]), |
1198 Git("checkout -f hash3 -- %s" % TEST_CONFIG[VERSION_FILE], "", | 1199 Git("checkout -f hash3 -- %s" % TEST_CONFIG[VERSION_FILE], "", |
1199 cb=ResetVersion(21, 2)), | 1200 cb=ResetVersion(21, 2)), |
| 1201 Git("log -1 --format=%B hash3", ""), |
1200 Git("log -1 --format=%s hash3", ""), | 1202 Git("log -1 --format=%s hash3", ""), |
1201 Git("svn find-rev hash3", "123"), | 1203 Git("svn find-rev hash3", "123"), |
1202 Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "", | 1204 Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "", |
1203 cb=ResetVersion(22, 5)), | 1205 cb=ResetVersion(22, 5)), |
1204 Git("reset --hard svn/trunk", ""), | 1206 Git("reset --hard svn/trunk", ""), |
1205 Git("log --format=%H", "hash6\n"), | 1207 Git("log --format=%H", "hash6\n"), |
1206 Git("diff --name-only hash6 hash6^", TEST_CONFIG[VERSION_FILE]), | 1208 Git("diff --name-only hash6 hash6^", TEST_CONFIG[VERSION_FILE]), |
1207 Git("checkout -f hash6 -- %s" % TEST_CONFIG[VERSION_FILE], "", | 1209 Git("checkout -f hash6 -- %s" % TEST_CONFIG[VERSION_FILE], "", |
1208 cb=ResetVersion(22, 3)), | 1210 cb=ResetVersion(22, 3)), |
| 1211 Git("log -1 --format=%B hash6", ""), |
1209 Git("log -1 --format=%s hash6", ""), | 1212 Git("log -1 --format=%s hash6", ""), |
1210 Git("svn find-rev hash6", "345"), | 1213 Git("svn find-rev hash6", "345"), |
1211 Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "", | 1214 Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "", |
1212 cb=ResetVersion(22, 5)), | 1215 cb=ResetVersion(22, 5)), |
1213 Git("status -s -uno", ""), | 1216 Git("status -s -uno", ""), |
1214 Git("checkout -f master", ""), | 1217 Git("checkout -f master", ""), |
1215 Git("pull", ""), | 1218 Git("pull", ""), |
1216 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""), | 1219 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""), |
1217 Git("log --format=%H --grep=\"V8\"", "c_hash1\nc_hash2\n"), | 1220 Git("log --format=%H --grep=\"V8\"", "c_hash1\nc_hash2\n"), |
1218 Git("diff --name-only c_hash1 c_hash1^", ""), | 1221 Git("diff --name-only c_hash1 c_hash1^", ""), |
(...skipping 17 matching lines...) Expand all Loading... |
1236 Releases(TEST_CONFIG, self).Run(args) | 1239 Releases(TEST_CONFIG, self).Run(args) |
1237 | 1240 |
1238 # Check expected output. | 1241 # Check expected output. |
1239 csv = ("3.22.3,trunk,345,4567,\r\n" | 1242 csv = ("3.22.3,trunk,345,4567,\r\n" |
1240 "3.21.2,3.21,123,,\r\n" | 1243 "3.21.2,3.21,123,,\r\n" |
1241 "3.3.1.1,3.3,234,,12\r\n") | 1244 "3.3.1.1,3.3,234,,12\r\n") |
1242 self.assertEquals(csv, FileToText(csv_output)) | 1245 self.assertEquals(csv, FileToText(csv_output)) |
1243 | 1246 |
1244 expected_json = [ | 1247 expected_json = [ |
1245 {"bleeding_edge": "", "patches_merged": "", "version": "3.22.3", | 1248 {"bleeding_edge": "", "patches_merged": "", "version": "3.22.3", |
1246 "chromium_revision": "4567", "branch": "trunk", "revision": "345"}, | 1249 "chromium_revision": "4567", "branch": "trunk", "revision": "345", |
| 1250 "review_link": "", |
| 1251 "revision_link": "https://code.google.com/p/v8/source/detail?r=345"}, |
1247 {"patches_merged": "", "bleeding_edge": "", "version": "3.21.2", | 1252 {"patches_merged": "", "bleeding_edge": "", "version": "3.21.2", |
1248 "chromium_revision": "", "branch": "3.21", "revision": "123"}, | 1253 "chromium_revision": "", "branch": "3.21", "revision": "123", |
| 1254 "review_link": "", |
| 1255 "revision_link": "https://code.google.com/p/v8/source/detail?r=123"}, |
1249 {"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1", | 1256 {"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1", |
1250 "chromium_revision": "", "branch": "3.3", "revision": "234"} | 1257 "chromium_revision": "", "branch": "3.3", "revision": "234", |
| 1258 "review_link": "fake.com", |
| 1259 "revision_link": "https://code.google.com/p/v8/source/detail?r=234"}, |
1251 ] | 1260 ] |
1252 self.assertEquals(expected_json, json.loads(FileToText(json_output))) | 1261 self.assertEquals(expected_json, json.loads(FileToText(json_output))) |
1253 | 1262 |
1254 | 1263 |
1255 class SystemTest(unittest.TestCase): | 1264 class SystemTest(unittest.TestCase): |
1256 def testReload(self): | 1265 def testReload(self): |
1257 step = MakeStep(step_class=PrepareChangeLog, number=0, state={}, config={}, | 1266 step = MakeStep(step_class=PrepareChangeLog, number=0, state={}, config={}, |
1258 side_effect_handler=DEFAULT_SIDE_EFFECT_HANDLER) | 1267 side_effect_handler=DEFAULT_SIDE_EFFECT_HANDLER) |
1259 body = step.Reload( | 1268 body = step.Reload( |
1260 """------------------------------------------------------------------------ | 1269 """------------------------------------------------------------------------ |
1261 r17997 | machenbach@chromium.org | 2013-11-22 11:04:04 +0100 (...) | 6 lines | 1270 r17997 | machenbach@chromium.org | 2013-11-22 11:04:04 +0100 (...) | 6 lines |
1262 | 1271 |
1263 Prepare push to trunk. Now working on version 3.23.11. | 1272 Prepare push to trunk. Now working on version 3.23.11. |
1264 | 1273 |
1265 R=danno@chromium.org | 1274 R=danno@chromium.org |
1266 | 1275 |
1267 Review URL: https://codereview.chromium.org/83173002 | 1276 Review URL: https://codereview.chromium.org/83173002 |
1268 | 1277 |
1269 ------------------------------------------------------------------------""") | 1278 ------------------------------------------------------------------------""") |
1270 self.assertEquals( | 1279 self.assertEquals( |
1271 """Prepare push to trunk. Now working on version 3.23.11. | 1280 """Prepare push to trunk. Now working on version 3.23.11. |
1272 | 1281 |
1273 R=danno@chromium.org | 1282 R=danno@chromium.org |
1274 | 1283 |
1275 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1284 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
OLD | NEW |