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