| 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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 Long commit message that fills more than 80 characters (Chromium issue 12345). | 687 Long commit message that fills more than 80 characters (Chromium issue 12345). |
| 688 | 688 |
| 689 Performance and stability improvements on all platforms.""" | 689 Performance and stability improvements on all platforms.""" |
| 690 self._TestSquashCommits(change_log, commit_msg) | 690 self._TestSquashCommits(change_log, commit_msg) |
| 691 | 691 |
| 692 def testSquashCommitsQuotationMarks(self): | 692 def testSquashCommitsQuotationMarks(self): |
| 693 change_log = """Line with "quotation marks".\n""" | 693 change_log = """Line with "quotation marks".\n""" |
| 694 commit_msg = """Line with "quotation marks".""" | 694 commit_msg = """Line with "quotation marks".""" |
| 695 self._TestSquashCommits(change_log, commit_msg) | 695 self._TestSquashCommits(change_log, commit_msg) |
| 696 | 696 |
| 697 def testBootstrapper(self): |
| 698 work_dir = self.MakeEmptyTempDirectory() |
| 699 class FakeScript(ScriptsBase): |
| 700 def _Steps(self): |
| 701 return [] |
| 702 |
| 703 # Use the test configuration without the fake testing default work dir. |
| 704 fake_config = dict(TEST_CONFIG) |
| 705 del(fake_config["DEFAULT_CWD"]) |
| 706 |
| 707 self.Expect([ |
| 708 Cmd("fetch v8", "", cwd=work_dir), |
| 709 ]) |
| 710 FakeScript(fake_config, self).Run(["--work-dir", work_dir]) |
| 711 |
| 697 def _PushToTrunk(self, force=False, manual=False): | 712 def _PushToTrunk(self, force=False, manual=False): |
| 698 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) | 713 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) |
| 699 | 714 |
| 700 # The version file on bleeding edge has build level 5, while the version | 715 # The version file on bleeding edge has build level 5, while the version |
| 701 # file from trunk has build level 4. | 716 # file from trunk has build level 4. |
| 702 self.WriteFakeVersionFile(build=5) | 717 self.WriteFakeVersionFile(build=5) |
| 703 | 718 |
| 704 TEST_CONFIG["CHANGELOG_ENTRY_FILE"] = self.MakeEmptyTempFile() | 719 TEST_CONFIG["CHANGELOG_ENTRY_FILE"] = self.MakeEmptyTempFile() |
| 705 TEST_CONFIG["CHANGELOG_FILE"] = self.MakeEmptyTempFile() | 720 TEST_CONFIG["CHANGELOG_FILE"] = self.MakeEmptyTempFile() |
| 706 bleeding_edge_change_log = "2014-03-17: Sentinel\n" | 721 bleeding_edge_change_log = "2014-03-17: Sentinel\n" |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS | 1327 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS |
| 1313 # ports of r12345. r56789 is the MIPS port of r34567. | 1328 # ports of r12345. r56789 is the MIPS port of r34567. |
| 1314 args = ["-f", "-p", extra_patch, "--branch", "trunk", | 1329 args = ["-f", "-p", extra_patch, "--branch", "trunk", |
| 1315 "--vc-interface", "git_svn", "12345", "23456", "34567"] | 1330 "--vc-interface", "git_svn", "12345", "23456", "34567"] |
| 1316 | 1331 |
| 1317 # The first run of the script stops because of the svn being down. | 1332 # The first run of the script stops because of the svn being down. |
| 1318 self.assertRaises(GitFailedException, | 1333 self.assertRaises(GitFailedException, |
| 1319 lambda: MergeToBranch(TEST_CONFIG, self).Run(args)) | 1334 lambda: MergeToBranch(TEST_CONFIG, self).Run(args)) |
| 1320 | 1335 |
| 1321 # Test that state recovery after restarting the script works. | 1336 # Test that state recovery after restarting the script works. |
| 1322 args += ["-s", "3"] | 1337 args += ["-s", "4"] |
| 1323 MergeToBranch(TEST_CONFIG, self).Run(args) | 1338 MergeToBranch(TEST_CONFIG, self).Run(args) |
| 1324 | 1339 |
| 1325 def testMergeToBranchNewGit(self): | 1340 def testMergeToBranchNewGit(self): |
| 1326 TEST_CONFIG["ALREADY_MERGING_SENTINEL_FILE"] = self.MakeEmptyTempFile() | 1341 TEST_CONFIG["ALREADY_MERGING_SENTINEL_FILE"] = self.MakeEmptyTempFile() |
| 1327 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) | 1342 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) |
| 1328 self.WriteFakeVersionFile(build=5) | 1343 self.WriteFakeVersionFile(build=5) |
| 1329 os.environ["EDITOR"] = "vi" | 1344 os.environ["EDITOR"] = "vi" |
| 1330 extra_patch = self.MakeEmptyTempFile() | 1345 extra_patch = self.MakeEmptyTempFile() |
| 1331 | 1346 |
| 1332 def VerifyPatch(patch): | 1347 def VerifyPatch(patch): |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS | 1468 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS |
| 1454 # ports of r12345. r56789 is the MIPS port of r34567. | 1469 # ports of r12345. r56789 is the MIPS port of r34567. |
| 1455 args = ["-f", "-p", extra_patch, "--branch", "candidates", | 1470 args = ["-f", "-p", extra_patch, "--branch", "candidates", |
| 1456 "--vc-interface", "git_read_svn_write", "12345", "23456", "34567"] | 1471 "--vc-interface", "git_read_svn_write", "12345", "23456", "34567"] |
| 1457 | 1472 |
| 1458 # The first run of the script stops because of the svn being down. | 1473 # The first run of the script stops because of the svn being down. |
| 1459 self.assertRaises(GitFailedException, | 1474 self.assertRaises(GitFailedException, |
| 1460 lambda: MergeToBranch(TEST_CONFIG, self).Run(args)) | 1475 lambda: MergeToBranch(TEST_CONFIG, self).Run(args)) |
| 1461 | 1476 |
| 1462 # Test that state recovery after restarting the script works. | 1477 # Test that state recovery after restarting the script works. |
| 1463 args += ["-s", "3"] | 1478 args += ["-s", "4"] |
| 1464 MergeToBranch(TEST_CONFIG, self).Run(args) | 1479 MergeToBranch(TEST_CONFIG, self).Run(args) |
| 1465 | 1480 |
| 1466 def testReleases(self): | 1481 def testReleases(self): |
| 1467 tag_response_text = """ | 1482 tag_response_text = """ |
| 1468 ------------------------------------------------------------------------ | 1483 ------------------------------------------------------------------------ |
| 1469 r22631 | author1@chromium.org | 2014-07-28 02:05:29 +0200 (Mon, 28 Jul 2014) | 1484 r22631 | author1@chromium.org | 2014-07-28 02:05:29 +0200 (Mon, 28 Jul 2014) |
| 1470 Changed paths: | 1485 Changed paths: |
| 1471 A /tags/3.28.43 (from /trunk:22630) | 1486 A /tags/3.28.43 (from /trunk:22630) |
| 1472 | 1487 |
| 1473 Tagging version 3.28.43 | 1488 Tagging version 3.28.43 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1841 | 1856 |
| 1842 Review URL: https://codereview.chromium.org/83173002 | 1857 Review URL: https://codereview.chromium.org/83173002 |
| 1843 | 1858 |
| 1844 ------------------------------------------------------------------------""") | 1859 ------------------------------------------------------------------------""") |
| 1845 self.assertEquals( | 1860 self.assertEquals( |
| 1846 """Prepare push to trunk. Now working on version 3.23.11. | 1861 """Prepare push to trunk. Now working on version 3.23.11. |
| 1847 | 1862 |
| 1848 R=danno@chromium.org | 1863 R=danno@chromium.org |
| 1849 | 1864 |
| 1850 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1865 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
| OLD | NEW |