Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: tools/push-to-trunk/test_scripts.py

Issue 497043002: Make v8 releases script ready for chromium git switch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/push-to-trunk/releases.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 1187
1188 Tagging version 3.27.34.7 1188 Tagging version 3.27.34.7
1189 ------------------------------------------------------------------------ 1189 ------------------------------------------------------------------------
1190 r22627 | author4@chromium.org | 2014-07-26 01:39:15 +0200 (Sat, 26 Jul 2014) 1190 r22627 | author4@chromium.org | 2014-07-26 01:39:15 +0200 (Sat, 26 Jul 2014)
1191 Changed paths: 1191 Changed paths:
1192 A /tags/3.28.40 (from /branches/bleeding_edge:22624) 1192 A /tags/3.28.40 (from /branches/bleeding_edge:22624)
1193 1193
1194 Tagging version 3.28.40 1194 Tagging version 3.28.40
1195 ------------------------------------------------------------------------ 1195 ------------------------------------------------------------------------
1196 """ 1196 """
1197 c_hash2_commit_log = """Revert something.
1198
1199 BUG=12345
1200
1201 Reason:
1202 > Some reason.
1203 > Cr-Commit-Position: refs/heads/master@{#12345}
1204 > git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12345 003-1c4
1205
1206 Review URL: https://codereview.chromium.org/12345
1207
1208 Cr-Commit-Position: refs/heads/master@{#4567}
1209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4567 0039-1c4b
1210
1211 """
1212 c_hash3_commit_log = """Simple.
1213
1214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
1215
1216 """
1197 json_output = self.MakeEmptyTempFile() 1217 json_output = self.MakeEmptyTempFile()
1198 csv_output = self.MakeEmptyTempFile() 1218 csv_output = self.MakeEmptyTempFile()
1199 TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile() 1219 TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
1200 self.WriteFakeVersionFile() 1220 self.WriteFakeVersionFile()
1201 1221
1202 TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile() 1222 TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
1203 if not os.path.exists(TEST_CONFIG[CHROMIUM]): 1223 if not os.path.exists(TEST_CONFIG[CHROMIUM]):
1204 os.makedirs(TEST_CONFIG[CHROMIUM]) 1224 os.makedirs(TEST_CONFIG[CHROMIUM])
1205 def WriteDEPS(revision): 1225 def WriteDEPS(revision):
1206 TextToFile("Line\n \"v8_revision\": \"%s\",\n line\n" % revision, 1226 TextToFile("Line\n \"v8_revision\": \"%s\",\n line\n" % revision,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 Git("svn find-rev r22626", "hash_22626"), 1283 Git("svn find-rev r22626", "hash_22626"),
1264 Git("svn find-rev hash_22626", "22626"), 1284 Git("svn find-rev hash_22626", "22626"),
1265 Git("log -1 --format=%ci hash_22626", "01:23"), 1285 Git("log -1 --format=%ci hash_22626", "01:23"),
1266 Git("svn find-rev r22624", "hash_22624"), 1286 Git("svn find-rev r22624", "hash_22624"),
1267 Git("svn find-rev hash_22624", "22624"), 1287 Git("svn find-rev hash_22624", "22624"),
1268 Git("log -1 --format=%ci hash_22624", "02:34"), 1288 Git("log -1 --format=%ci hash_22624", "02:34"),
1269 Git("status -s -uno", ""), 1289 Git("status -s -uno", ""),
1270 Git("checkout -f master", ""), 1290 Git("checkout -f master", ""),
1271 Git("pull", ""), 1291 Git("pull", ""),
1272 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""), 1292 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""),
1273 Git("log --format=%H --grep=\"V8\"", "c_hash1\nc_hash2\n"), 1293 Git("log --format=%H --grep=\"V8\"", "c_hash1\nc_hash2\nc_hash3\n"),
1274 Git("diff --name-only c_hash1 c_hash1^", ""), 1294 Git("diff --name-only c_hash1 c_hash1^", ""),
1275 Git("diff --name-only c_hash2 c_hash2^", TEST_CONFIG[DEPS_FILE]), 1295 Git("diff --name-only c_hash2 c_hash2^", TEST_CONFIG[DEPS_FILE]),
1276 Git("checkout -f c_hash2 -- %s" % TEST_CONFIG[DEPS_FILE], "", 1296 Git("checkout -f c_hash2 -- %s" % TEST_CONFIG[DEPS_FILE], "",
1297 cb=ResetDEPS(22624)),
1298 Git("log -1 --format=%B c_hash2", c_hash2_commit_log),
1299 Git("diff --name-only c_hash3 c_hash3^", TEST_CONFIG[DEPS_FILE]),
1300 Git("checkout -f c_hash3 -- %s" % TEST_CONFIG[DEPS_FILE], "",
1277 cb=ResetDEPS(345)), 1301 cb=ResetDEPS(345)),
1278 Git("svn find-rev c_hash2", "4567"), 1302 Git("log -1 --format=%B c_hash3", c_hash3_commit_log),
1279 Git("checkout -f HEAD -- %s" % TEST_CONFIG[DEPS_FILE], "", 1303 Git("checkout -f HEAD -- %s" % TEST_CONFIG[DEPS_FILE], "",
1280 cb=ResetDEPS(567)), 1304 cb=ResetDEPS(567)),
1281 Git("branch -r", " weird/123\n branch-heads/7\n"), 1305 Git("branch -r", " weird/123\n branch-heads/7\n"),
1282 Git("checkout -f branch-heads/7 -- %s" % TEST_CONFIG[DEPS_FILE], "", 1306 Git("checkout -f branch-heads/7 -- %s" % TEST_CONFIG[DEPS_FILE], "",
1283 cb=ResetDEPS(345)), 1307 cb=ResetDEPS(345)),
1284 Git("checkout -f HEAD -- %s" % TEST_CONFIG[DEPS_FILE], "", 1308 Git("checkout -f HEAD -- %s" % TEST_CONFIG[DEPS_FILE], "",
1285 cb=ResetDEPS(567)), 1309 cb=ResetDEPS(567)),
1286 Git("checkout -f master", ""), 1310 Git("checkout -f master", ""),
1287 Git("branch -D %s" % TEST_CONFIG[BRANCHNAME], ""), 1311 Git("branch -D %s" % TEST_CONFIG[BRANCHNAME], ""),
1288 Git("checkout -f some_branch", ""), 1312 Git("checkout -f some_branch", ""),
1289 Git("branch -D %s" % TEST_CONFIG[BRANCHNAME], ""), 1313 Git("branch -D %s" % TEST_CONFIG[BRANCHNAME], ""),
1290 ]) 1314 ])
1291 1315
1292 args = ["-c", TEST_CONFIG[CHROMIUM], 1316 args = ["-c", TEST_CONFIG[CHROMIUM],
1293 "--json", json_output, 1317 "--json", json_output,
1294 "--csv", csv_output, 1318 "--csv", csv_output,
1295 "--max-releases", "1"] 1319 "--max-releases", "1"]
1296 Releases(TEST_CONFIG, self).Run(args) 1320 Releases(TEST_CONFIG, self).Run(args)
1297 1321
1298 # Check expected output. 1322 # Check expected output.
1299 csv = ("3.28.41,bleeding_edge,22626,,\r\n" 1323 csv = ("3.28.41,bleeding_edge,22626,,\r\n"
1300 "3.28.40,bleeding_edge,22624,,\r\n" 1324 "3.28.40,bleeding_edge,22624,4567,\r\n"
1301 "3.22.3,trunk,345,4567,\r\n" 1325 "3.22.3,trunk,345,3456:4566,\r\n"
1302 "3.21.2,3.21,123,,\r\n" 1326 "3.21.2,3.21,123,,\r\n"
1303 "3.3.1.1,3.3,234,,12\r\n") 1327 "3.3.1.1,3.3,234,,12\r\n")
1304 self.assertEquals(csv, FileToText(csv_output)) 1328 self.assertEquals(csv, FileToText(csv_output))
1305 1329
1306 expected_json = [ 1330 expected_json = [
1307 {"bleeding_edge": "22626", "patches_merged": "", "version": "3.28.41", 1331 {"bleeding_edge": "22626", "patches_merged": "", "version": "3.28.41",
1308 "chromium_revision": "", "branch": "bleeding_edge", "revision": "22626", 1332 "chromium_revision": "", "branch": "bleeding_edge", "revision": "22626",
1309 "review_link": "", "date": "01:23", "chromium_branch": "", 1333 "review_link": "", "date": "01:23", "chromium_branch": "",
1310 "revision_link": "https://code.google.com/p/v8/source/detail?r=22626"}, 1334 "revision_link": "https://code.google.com/p/v8/source/detail?r=22626"},
1311 {"bleeding_edge": "22624", "patches_merged": "", "version": "3.28.40", 1335 {"bleeding_edge": "22624", "patches_merged": "", "version": "3.28.40",
1312 "chromium_revision": "", "branch": "bleeding_edge", "revision": "22624", 1336 "chromium_revision": "4567", "branch": "bleeding_edge",
1313 "review_link": "", "date": "02:34", "chromium_branch": "", 1337 "revision": "22624", "review_link": "", "date": "02:34",
1338 "chromium_branch": "",
1314 "revision_link": "https://code.google.com/p/v8/source/detail?r=22624"}, 1339 "revision_link": "https://code.google.com/p/v8/source/detail?r=22624"},
1315 {"bleeding_edge": "", "patches_merged": "", "version": "3.22.3", 1340 {"bleeding_edge": "", "patches_merged": "", "version": "3.22.3",
1316 "chromium_revision": "4567", "branch": "trunk", "revision": "345", 1341 "chromium_revision": "3456:4566", "branch": "trunk", "revision": "345",
1317 "review_link": "", "date": "", "chromium_branch": "7", 1342 "review_link": "", "date": "", "chromium_branch": "7",
1318 "revision_link": "https://code.google.com/p/v8/source/detail?r=345"}, 1343 "revision_link": "https://code.google.com/p/v8/source/detail?r=345"},
1319 {"patches_merged": "", "bleeding_edge": "", "version": "3.21.2", 1344 {"patches_merged": "", "bleeding_edge": "", "version": "3.21.2",
1320 "chromium_revision": "", "branch": "3.21", "revision": "123", 1345 "chromium_revision": "", "branch": "3.21", "revision": "123",
1321 "review_link": "", "date": "03:15", "chromium_branch": "", 1346 "review_link": "", "date": "03:15", "chromium_branch": "",
1322 "revision_link": "https://code.google.com/p/v8/source/detail?r=123"}, 1347 "revision_link": "https://code.google.com/p/v8/source/detail?r=123"},
1323 {"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1", 1348 {"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1",
1324 "chromium_revision": "", "branch": "3.3", "revision": "234", 1349 "chromium_revision": "", "branch": "3.3", "revision": "234",
1325 "review_link": "fake.com", "date": "18:15", "chromium_branch": "", 1350 "review_link": "fake.com", "date": "18:15", "chromium_branch": "",
1326 "revision_link": "https://code.google.com/p/v8/source/detail?r=234"}, 1351 "revision_link": "https://code.google.com/p/v8/source/detail?r=234"},
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 1506
1482 Review URL: https://codereview.chromium.org/83173002 1507 Review URL: https://codereview.chromium.org/83173002
1483 1508
1484 ------------------------------------------------------------------------""") 1509 ------------------------------------------------------------------------""")
1485 self.assertEquals( 1510 self.assertEquals(
1486 """Prepare push to trunk. Now working on version 3.23.11. 1511 """Prepare push to trunk. Now working on version 3.23.11.
1487 1512
1488 R=danno@chromium.org 1513 R=danno@chromium.org
1489 1514
1490 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1515 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body)
OLDNEW
« no previous file with comments | « tools/push-to-trunk/releases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698