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

Side by Side Diff: tools/release/test_scripts.py

Issue 1060013003: [release-tools] Only read from the chromium checkout in v8rel. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« tools/release/releases.py ('K') | « tools/release/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 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 git-svn-id: googlecode@123 0039-1c4b 1315 git-svn-id: googlecode@123 0039-1c4b
1316 """ 1316 """
1317 c_hash_345_commit_log = """Version 3.4.0. 1317 c_hash_345_commit_log = """Version 3.4.0.
1318 1318
1319 Cr-Commit-Position: refs/heads/candidates@{#345} 1319 Cr-Commit-Position: refs/heads/candidates@{#345}
1320 """ 1320 """
1321 c_hash_456_commit_log = """Version 4.2.71. 1321 c_hash_456_commit_log = """Version 4.2.71.
1322 1322
1323 Cr-Commit-Position: refs/heads/4.2.71@{#1} 1323 Cr-Commit-Position: refs/heads/4.2.71@{#1}
1324 """ 1324 """
1325 c_deps = "Line\n \"v8_revision\": \"%s\",\n line\n"
1325 1326
1326 json_output = self.MakeEmptyTempFile() 1327 json_output = self.MakeEmptyTempFile()
1327 csv_output = self.MakeEmptyTempFile() 1328 csv_output = self.MakeEmptyTempFile()
1328 self.WriteFakeVersionFile() 1329 self.WriteFakeVersionFile()
1329 1330
1330 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() 1331 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
1331 chrome_dir = TEST_CONFIG["CHROMIUM"] 1332 chrome_dir = TEST_CONFIG["CHROMIUM"]
1332 chrome_v8_dir = os.path.join(chrome_dir, "v8") 1333 chrome_v8_dir = os.path.join(chrome_dir, "v8")
1333 os.makedirs(chrome_v8_dir) 1334 os.makedirs(chrome_v8_dir)
1334 def WriteDEPS(revision):
1335 TextToFile("Line\n \"v8_revision\": \"%s\",\n line\n" % revision,
1336 os.path.join(chrome_dir, "DEPS"))
1337 WriteDEPS(567)
1338 1335
1339 def ResetVersion(major, minor, build, patch=0): 1336 def ResetVersion(major, minor, build, patch=0):
1340 return lambda: self.WriteFakeVersionFile(major=major, 1337 return lambda: self.WriteFakeVersionFile(major=major,
1341 minor=minor, 1338 minor=minor,
1342 build=build, 1339 build=build,
1343 patch=patch) 1340 patch=patch)
1344 1341
1345 def ResetDEPS(revision):
1346 return lambda: WriteDEPS(revision)
1347
1348 self.Expect([ 1342 self.Expect([
1349 Cmd("git status -s -uno", ""), 1343 Cmd("git status -s -uno", ""),
1350 Cmd("git checkout -f origin/master", ""), 1344 Cmd("git checkout -f origin/master", ""),
1351 Cmd("git fetch", ""), 1345 Cmd("git fetch", ""),
1352 Cmd("git branch", " branch1\n* branch2\n"), 1346 Cmd("git branch", " branch1\n* branch2\n"),
1353 Cmd("git new-branch %s" % TEST_CONFIG["BRANCHNAME"], ""), 1347 Cmd("git new-branch %s" % TEST_CONFIG["BRANCHNAME"], ""),
1354 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), 1348 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
1355 Cmd("git rev-list --max-age=395200 --tags", 1349 Cmd("git rev-list --max-age=395200 --tags",
1356 "bad_tag\nhash_234\nhash_123\nhash_345\nhash_456\n"), 1350 "bad_tag\nhash_234\nhash_123\nhash_345\nhash_456\n"),
1357 Cmd("git describe --tags bad_tag", "3.23.42-1-deadbeef"), 1351 Cmd("git describe --tags bad_tag", "3.23.42-1-deadbeef"),
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 Cmd("git log -1 --format=%B hash_456", c_hash_456_commit_log), 1390 Cmd("git log -1 --format=%B hash_456", c_hash_456_commit_log),
1397 Cmd("git log -1 --format=%H 4.2.71", "hash_456"), 1391 Cmd("git log -1 --format=%H 4.2.71", "hash_456"),
1398 Cmd("git log -1 --format=%s hash_456", "Version 4.2.71"), 1392 Cmd("git log -1 --format=%s hash_456", "Version 4.2.71"),
1399 Cmd("git log -1 --format=%H hash_456^", "master_456"), 1393 Cmd("git log -1 --format=%H hash_456^", "master_456"),
1400 Cmd("git log -1 --format=%B master_456", 1394 Cmd("git log -1 --format=%B master_456",
1401 "Cr-Commit-Position: refs/heads/master@{#456}"), 1395 "Cr-Commit-Position: refs/heads/master@{#456}"),
1402 Cmd("git log -1 --format=%B hash_456", c_hash_456_commit_log), 1396 Cmd("git log -1 --format=%B hash_456", c_hash_456_commit_log),
1403 Cmd("git log -1 --format=%ci hash_456", "02:15"), 1397 Cmd("git log -1 --format=%ci hash_456", "02:15"),
1404 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", 1398 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
1405 cb=ResetVersion(3, 22, 5)), 1399 cb=ResetVersion(3, 22, 5)),
1406 Cmd("git status -s -uno", "", cwd=chrome_dir), 1400 Cmd("git fetch origin +refs/heads/*:refs/remotes/origin/* "
1407 Cmd("git checkout -f master", "", cwd=chrome_dir), 1401 "+refs/branch-heads/*:refs/remotes/branch-heads/*", "",
1408 Cmd("git pull", "", cwd=chrome_dir),
1409 Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"],
1410 cwd=chrome_dir),
1411 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], "",
1412 cwd=chrome_dir),
1413 Cmd("git new-branch %s" % TEST_CONFIG["BRANCHNAME"], "",
1414 cwd=chrome_dir), 1402 cwd=chrome_dir),
1415 Cmd("git fetch origin", "", cwd=chrome_v8_dir), 1403 Cmd("git fetch origin", "", cwd=chrome_v8_dir),
1416 Cmd("git log --format=%H --grep=\"V8\"", 1404 Cmd("git log --format=%H --grep=\"V8\" origin/master -- DEPS",
1417 "c_hash0\nc_hash1\nc_hash2\nc_hash3\n", 1405 "c_hash1\nc_hash2\nc_hash3\n",
1418 cwd=chrome_dir), 1406 cwd=chrome_dir),
1419 Cmd("git diff --name-only c_hash0 c_hash0^", "", cwd=chrome_dir), 1407 Cmd("git show c_hash1:DEPS", c_deps % "hash_456", cwd=chrome_dir),
1420 Cmd("git diff --name-only c_hash1 c_hash1^", "DEPS", cwd=chrome_dir),
1421 Cmd("git checkout -f c_hash1 -- DEPS", "",
1422 cb=ResetDEPS("hash_456"),
1423 cwd=chrome_dir),
1424 Cmd("git log -1 --format=%B c_hash1", c_hash1_commit_log, 1408 Cmd("git log -1 --format=%B c_hash1", c_hash1_commit_log,
1425 cwd=chrome_dir), 1409 cwd=chrome_dir),
1426 Cmd("git diff --name-only c_hash2 c_hash2^", "DEPS", cwd=chrome_dir), 1410 Cmd("git show c_hash2:DEPS", c_deps % "hash_345", cwd=chrome_dir),
1427 Cmd("git checkout -f c_hash2 -- DEPS", "",
1428 cb=ResetDEPS("hash_345"),
1429 cwd=chrome_dir),
1430 Cmd("git log -1 --format=%B c_hash2", c_hash2_commit_log, 1411 Cmd("git log -1 --format=%B c_hash2", c_hash2_commit_log,
1431 cwd=chrome_dir), 1412 cwd=chrome_dir),
1432 Cmd("git diff --name-only c_hash3 c_hash3^", "DEPS", cwd=chrome_dir), 1413 Cmd("git show c_hash3:DEPS", c_deps % "deadbeef", cwd=chrome_dir),
1433 Cmd("git checkout -f c_hash3 -- DEPS", "", cb=ResetDEPS("deadbeef"),
1434 cwd=chrome_dir),
1435 Cmd("git log -1 --format=%B c_hash3", c_hash3_commit_log, 1414 Cmd("git log -1 --format=%B c_hash3", c_hash3_commit_log,
1436 cwd=chrome_dir), 1415 cwd=chrome_dir),
1437 Cmd("git checkout -f HEAD -- DEPS", "", cb=ResetDEPS("hash_567"), 1416 Cmd("git branch -r", " weird/123\n branch-heads/7\n", cwd=chrome_dir),
1417 Cmd("git show refs/branch-heads/7:DEPS", c_deps % "hash_345",
1438 cwd=chrome_dir), 1418 cwd=chrome_dir),
1439 Cmd("git branch -r", " weird/123\n branch-heads/7\n", cwd=chrome_dir),
1440 Cmd("git checkout -f branch-heads/7 -- DEPS", "",
1441 cb=ResetDEPS("hash_345"),
1442 cwd=chrome_dir),
1443 Cmd("git checkout -f HEAD -- DEPS", "", cb=ResetDEPS("hash_567"),
1444 cwd=chrome_dir),
1445 Cmd("git checkout -f master", "", cwd=chrome_dir),
1446 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], "", cwd=chrome_dir),
1447 Cmd("git checkout -f origin/master", ""), 1419 Cmd("git checkout -f origin/master", ""),
1448 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), 1420 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
1449 ]) 1421 ])
1450 1422
1451 args = ["-c", TEST_CONFIG["CHROMIUM"], 1423 args = ["-c", TEST_CONFIG["CHROMIUM"],
1452 "--json", json_output, 1424 "--json", json_output,
1453 "--csv", csv_output, 1425 "--csv", csv_output,
1454 "--max-releases", "1"] 1426 "--max-releases", "1"]
1455 Releases(TEST_CONFIG, self).Run(args) 1427 Releases(TEST_CONFIG, self).Run(args)
1456 1428
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 1512
1541 Review URL: https://codereview.chromium.org/83173002 1513 Review URL: https://codereview.chromium.org/83173002
1542 1514
1543 ------------------------------------------------------------------------""") 1515 ------------------------------------------------------------------------""")
1544 self.assertEquals( 1516 self.assertEquals(
1545 """Prepare push to trunk. Now working on version 3.23.11. 1517 """Prepare push to trunk. Now working on version 3.23.11.
1546 1518
1547 R=danno@chromium.org 1519 R=danno@chromium.org
1548 1520
1549 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1521 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body)
OLDNEW
« tools/release/releases.py ('K') | « tools/release/releases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698