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

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

Issue 500023003: Teach v8rel script to read git hashes from DEPS. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review 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 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 1207
1208 Cr-Commit-Position: refs/heads/master@{#4567} 1208 Cr-Commit-Position: refs/heads/master@{#4567}
1209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4567 0039-1c4b 1209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4567 0039-1c4b
1210 1210
1211 """ 1211 """
1212 c_hash3_commit_log = """Simple. 1212 c_hash3_commit_log = """Simple.
1213 1213
1214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b 1214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
1215 1215
1216 """ 1216 """
1217 c_v8_22624_log = """V8 CL.
1218
1219 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22624 123
1220
1221 """
1217 json_output = self.MakeEmptyTempFile() 1222 json_output = self.MakeEmptyTempFile()
1218 csv_output = self.MakeEmptyTempFile() 1223 csv_output = self.MakeEmptyTempFile()
1219 TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile() 1224 TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
1220 self.WriteFakeVersionFile() 1225 self.WriteFakeVersionFile()
1221 1226
1222 TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile() 1227 TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
1223 if not os.path.exists(TEST_CONFIG[CHROMIUM]): 1228 if not os.path.exists(TEST_CONFIG[CHROMIUM]):
1224 os.makedirs(TEST_CONFIG[CHROMIUM]) 1229 os.makedirs(TEST_CONFIG[CHROMIUM])
1230 if not os.path.exists(os.path.join(TEST_CONFIG[CHROMIUM], "v8")):
1231 os.makedirs(os.path.join(TEST_CONFIG[CHROMIUM], "v8"))
1225 def WriteDEPS(revision): 1232 def WriteDEPS(revision):
1226 TextToFile("Line\n \"v8_revision\": \"%s\",\n line\n" % revision, 1233 TextToFile("Line\n \"v8_revision\": \"%s\",\n line\n" % revision,
1227 TEST_CONFIG[DEPS_FILE]) 1234 TEST_CONFIG[DEPS_FILE])
1228 WriteDEPS(567) 1235 WriteDEPS(567)
1229 1236
1230 def ResetVersion(minor, build, patch=0): 1237 def ResetVersion(minor, build, patch=0):
1231 return lambda: self.WriteFakeVersionFile(minor=minor, 1238 return lambda: self.WriteFakeVersionFile(minor=minor,
1232 build=build, 1239 build=build,
1233 patch=patch) 1240 patch=patch)
1234 1241
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 Git("svn find-rev r22626", "hash_22626"), 1290 Git("svn find-rev r22626", "hash_22626"),
1284 Git("svn find-rev hash_22626", "22626"), 1291 Git("svn find-rev hash_22626", "22626"),
1285 Git("log -1 --format=%ci hash_22626", "01:23"), 1292 Git("log -1 --format=%ci hash_22626", "01:23"),
1286 Git("svn find-rev r22624", "hash_22624"), 1293 Git("svn find-rev r22624", "hash_22624"),
1287 Git("svn find-rev hash_22624", "22624"), 1294 Git("svn find-rev hash_22624", "22624"),
1288 Git("log -1 --format=%ci hash_22624", "02:34"), 1295 Git("log -1 --format=%ci hash_22624", "02:34"),
1289 Git("status -s -uno", ""), 1296 Git("status -s -uno", ""),
1290 Git("checkout -f master", ""), 1297 Git("checkout -f master", ""),
1291 Git("pull", ""), 1298 Git("pull", ""),
1292 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""), 1299 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""),
1300 Git("fetch origin", ""),
1293 Git("log --format=%H --grep=\"V8\"", "c_hash1\nc_hash2\nc_hash3\n"), 1301 Git("log --format=%H --grep=\"V8\"", "c_hash1\nc_hash2\nc_hash3\n"),
1294 Git("diff --name-only c_hash1 c_hash1^", ""), 1302 Git("diff --name-only c_hash1 c_hash1^", ""),
1295 Git("diff --name-only c_hash2 c_hash2^", TEST_CONFIG[DEPS_FILE]), 1303 Git("diff --name-only c_hash2 c_hash2^", TEST_CONFIG[DEPS_FILE]),
1296 Git("checkout -f c_hash2 -- %s" % TEST_CONFIG[DEPS_FILE], "", 1304 Git("checkout -f c_hash2 -- %s" % TEST_CONFIG[DEPS_FILE], "",
1297 cb=ResetDEPS(22624)), 1305 cb=ResetDEPS("0123456789012345678901234567890123456789")),
1298 Git("log -1 --format=%B c_hash2", c_hash2_commit_log), 1306 Git("log -1 --format=%B c_hash2", c_hash2_commit_log),
1307 Git("rev-list -n 1 0123456789012345678901234567890123456789",
1308 "0123456789012345678901234567890123456789"),
1309 Git("log -1 --format=%B 0123456789012345678901234567890123456789",
1310 c_v8_22624_log),
1299 Git("diff --name-only c_hash3 c_hash3^", TEST_CONFIG[DEPS_FILE]), 1311 Git("diff --name-only c_hash3 c_hash3^", TEST_CONFIG[DEPS_FILE]),
1300 Git("checkout -f c_hash3 -- %s" % TEST_CONFIG[DEPS_FILE], "", 1312 Git("checkout -f c_hash3 -- %s" % TEST_CONFIG[DEPS_FILE], "",
1301 cb=ResetDEPS(345)), 1313 cb=ResetDEPS(345)),
1302 Git("log -1 --format=%B c_hash3", c_hash3_commit_log), 1314 Git("log -1 --format=%B c_hash3", c_hash3_commit_log),
1303 Git("checkout -f HEAD -- %s" % TEST_CONFIG[DEPS_FILE], "", 1315 Git("checkout -f HEAD -- %s" % TEST_CONFIG[DEPS_FILE], "",
1304 cb=ResetDEPS(567)), 1316 cb=ResetDEPS(567)),
1305 Git("branch -r", " weird/123\n branch-heads/7\n"), 1317 Git("branch -r", " weird/123\n branch-heads/7\n"),
1306 Git("checkout -f branch-heads/7 -- %s" % TEST_CONFIG[DEPS_FILE], "", 1318 Git("checkout -f branch-heads/7 -- %s" % TEST_CONFIG[DEPS_FILE], "",
1307 cb=ResetDEPS(345)), 1319 cb=ResetDEPS(345)),
1308 Git("checkout -f HEAD -- %s" % TEST_CONFIG[DEPS_FILE], "", 1320 Git("checkout -f HEAD -- %s" % TEST_CONFIG[DEPS_FILE], "",
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 1518
1507 Review URL: https://codereview.chromium.org/83173002 1519 Review URL: https://codereview.chromium.org/83173002
1508 1520
1509 ------------------------------------------------------------------------""") 1521 ------------------------------------------------------------------------""")
1510 self.assertEquals( 1522 self.assertEquals(
1511 """Prepare push to trunk. Now working on version 3.23.11. 1523 """Prepare push to trunk. Now working on version 3.23.11.
1512 1524
1513 R=danno@chromium.org 1525 R=danno@chromium.org
1514 1526
1515 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1527 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