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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 self.assertEquals("some_branch", self._state["current_branch"]) | 481 self.assertEquals("some_branch", self._state["current_branch"]) |
482 | 482 |
483 def testInitialEnvironmentChecks(self): | 483 def testInitialEnvironmentChecks(self): |
484 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) | 484 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) |
485 os.environ["EDITOR"] = "vi" | 485 os.environ["EDITOR"] = "vi" |
486 self.Expect([ | 486 self.Expect([ |
487 Cmd("which vi", "/usr/bin/vi"), | 487 Cmd("which vi", "/usr/bin/vi"), |
488 ]) | 488 ]) |
489 self.MakeStep().InitialEnvironmentChecks(TEST_CONFIG["DEFAULT_CWD"]) | 489 self.MakeStep().InitialEnvironmentChecks(TEST_CONFIG["DEFAULT_CWD"]) |
490 | 490 |
| 491 def testTagTimeout(self): |
| 492 self.Expect([ |
| 493 Cmd("git log -1 --format=%s", "Title"), |
| 494 Cmd("git fetch", ""), |
| 495 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""), |
| 496 Cmd("git fetch", ""), |
| 497 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""), |
| 498 Cmd("git fetch", ""), |
| 499 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""), |
| 500 Cmd("git fetch", ""), |
| 501 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""), |
| 502 ]) |
| 503 args = ["--branch", "candidates", "--vc-interface", "git_read_svn_write", |
| 504 "12345"] |
| 505 self._state["version"] = "tag_name" |
| 506 self.assertRaises(Exception, |
| 507 lambda: self.RunStep(MergeToBranch, TagRevision, args)) |
| 508 |
491 def testReadAndPersistVersion(self): | 509 def testReadAndPersistVersion(self): |
492 self.WriteFakeVersionFile(build=5) | 510 self.WriteFakeVersionFile(build=5) |
493 step = self.MakeStep() | 511 step = self.MakeStep() |
494 step.ReadAndPersistVersion() | 512 step.ReadAndPersistVersion() |
495 self.assertEquals("3", step["major"]) | 513 self.assertEquals("3", step["major"]) |
496 self.assertEquals("22", step["minor"]) | 514 self.assertEquals("22", step["minor"]) |
497 self.assertEquals("5", step["build"]) | 515 self.assertEquals("5", step["build"]) |
498 self.assertEquals("0", step["patch"]) | 516 self.assertEquals("0", step["patch"]) |
499 | 517 |
500 def testRegex(self): | 518 def testRegex(self): |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 RL("Y"), # Automatically increment patch level? | 1287 RL("Y"), # Automatically increment patch level? |
1270 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], ""), | 1288 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], ""), |
1271 RL("reviewer@chromium.org"), # V8 reviewer. | 1289 RL("reviewer@chromium.org"), # V8 reviewer. |
1272 Cmd("git cl upload --send-mail -r \"reviewer@chromium.org\" " | 1290 Cmd("git cl upload --send-mail -r \"reviewer@chromium.org\" " |
1273 "--bypass-hooks --cc \"ulan@chromium.org\"", ""), | 1291 "--bypass-hooks --cc \"ulan@chromium.org\"", ""), |
1274 Cmd("git checkout -f %s" % TEST_CONFIG["BRANCHNAME"], ""), | 1292 Cmd("git checkout -f %s" % TEST_CONFIG["BRANCHNAME"], ""), |
1275 RL("LGTM"), # Enter LGTM for V8 CL. | 1293 RL("LGTM"), # Enter LGTM for V8 CL. |
1276 Cmd("git cl presubmit", "Presubmit successfull\n"), | 1294 Cmd("git cl presubmit", "Presubmit successfull\n"), |
1277 Cmd("git cl dcommit -f --bypass-hooks", "Closing issue\n", | 1295 Cmd("git cl dcommit -f --bypass-hooks", "Closing issue\n", |
1278 cb=VerifySVNCommit), | 1296 cb=VerifySVNCommit), |
1279 # FIXME(machenbach): This won't work when setting tags on the git repo. | 1297 Cmd("git log -1 --format=%s", "Unique title"), |
1280 Cmd("git svn fetch", ""), | 1298 Cmd("git fetch", ""), |
1281 Cmd("git rebase origin/candidates", ""), | 1299 Cmd("git log -1 --format=%H --grep=\"Unique title\" origin/candidates", |
1282 Cmd("git svn tag 3.22.5.1 -m \"Tagging version 3.22.5.1\"", ""), | 1300 ""), |
| 1301 Cmd("git fetch", ""), |
| 1302 Cmd("git log -1 --format=%H --grep=\"Unique title\" origin/candidates", |
| 1303 "hsh_to_tag"), |
| 1304 Cmd("git tag 3.22.5.1 hsh_to_tag", ""), |
| 1305 Cmd("git push origin 3.22.5.1", ""), |
1283 Cmd("git checkout -f some_branch", ""), | 1306 Cmd("git checkout -f some_branch", ""), |
1284 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), | 1307 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), |
1285 ]) | 1308 ]) |
1286 | 1309 |
1287 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS | 1310 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS |
1288 # ports of r12345. r56789 is the MIPS port of r34567. | 1311 # ports of r12345. r56789 is the MIPS port of r34567. |
1289 args = ["-f", "-p", extra_patch, "--branch", "candidates", | 1312 args = ["-f", "-p", extra_patch, "--branch", "candidates", |
1290 "--vc-interface", "git_read_svn_write", "12345", "23456", "34567"] | 1313 "--vc-interface", "git_read_svn_write", "12345", "23456", "34567"] |
1291 | 1314 |
1292 # The first run of the script stops because of the svn being down. | 1315 # The first run of the script stops because of the svn being down. |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 | 1697 |
1675 Review URL: https://codereview.chromium.org/83173002 | 1698 Review URL: https://codereview.chromium.org/83173002 |
1676 | 1699 |
1677 ------------------------------------------------------------------------""") | 1700 ------------------------------------------------------------------------""") |
1678 self.assertEquals( | 1701 self.assertEquals( |
1679 """Prepare push to trunk. Now working on version 3.23.11. | 1702 """Prepare push to trunk. Now working on version 3.23.11. |
1680 | 1703 |
1681 R=danno@chromium.org | 1704 R=danno@chromium.org |
1682 | 1705 |
1683 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1706 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
OLD | NEW |