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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 Git("log -1 hash2", "Log message\n"), | 702 Git("log -1 hash2", "Log message\n"), |
703 Git("log -1 --format=%s hash2", | 703 Git("log -1 --format=%s hash2", |
704 "Version 3.4.5 (based on bleeding_edge revision r1234)\n"), | 704 "Version 3.4.5 (based on bleeding_edge revision r1234)\n"), |
705 Git("svn find-rev r1234", "hash3\n"), | 705 Git("svn find-rev r1234", "hash3\n"), |
706 Git("checkout -f hash2 -- %s" % TEST_CONFIG[VERSION_FILE], "", | 706 Git("checkout -f hash2 -- %s" % TEST_CONFIG[VERSION_FILE], "", |
707 cb=self.WriteFakeVersionFile), | 707 cb=self.WriteFakeVersionFile), |
708 Git("log --format=%H hash3..HEAD", "rev1\n"), | 708 Git("log --format=%H hash3..HEAD", "rev1\n"), |
709 Git("log -1 --format=%s rev1", "Log text 1.\n"), | 709 Git("log -1 --format=%s rev1", "Log text 1.\n"), |
710 Git("log -1 --format=%B rev1", "Text\nLOG=YES\nBUG=v8:321\nText\n"), | 710 Git("log -1 --format=%B rev1", "Text\nLOG=YES\nBUG=v8:321\nText\n"), |
711 Git("log -1 --format=%an rev1", "author1@chromium.org\n"), | 711 Git("log -1 --format=%an rev1", "author1@chromium.org\n"), |
712 Git(("commit -am \"Prepare push to trunk. " | |
713 "Now working on version 3.22.6.%s\"" % review_suffix), | |
714 " 2 files changed\n", | |
715 cb=CheckPreparePush), | |
716 Git(("cl upload --send-mail --email \"author@chromium.org\" " | |
717 "-r \"reviewer@chromium.org\"%s" % force_flag), | |
718 "done\n"), | |
719 Git("cl presubmit", "Presubmit successfull\n"), | |
720 Git("cl dcommit -f --bypass-hooks", "Closing issue\n"), | |
721 Git("svn fetch", "fetch result\n"), | 712 Git("svn fetch", "fetch result\n"), |
722 Git("checkout -f svn/bleeding_edge", ""), | 713 Git("checkout -f svn/bleeding_edge", ""), |
723 Git(("log -1 --format=%H --grep=\"Prepare push to trunk. " | 714 Git("log -1 --format=%H HEAD", "push_hash\n"), |
724 "Now working on version 3.22.6.\""), | |
725 "prep_hash\n"), | |
726 Git("log -1 --format=%H prep_hash^", "push_hash\n"), | |
727 Git("diff svn/trunk push_hash", "patch content\n"), | 715 Git("diff svn/trunk push_hash", "patch content\n"), |
728 Git("svn find-rev push_hash", "123455\n"), | 716 Git("svn find-rev push_hash", "123455\n"), |
729 Git("checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], "", | 717 Git("checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], "", |
730 cb=ResetToTrunk), | 718 cb=ResetToTrunk), |
731 Git("apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""), | 719 Git("apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""), |
732 Git("checkout -f svn/trunk -- %s" % TEST_CONFIG[CHANGELOG_FILE], "", | 720 Git("checkout -f svn/trunk -- %s" % TEST_CONFIG[CHANGELOG_FILE], "", |
733 cb=ResetChangeLog), | 721 cb=ResetChangeLog), |
734 Git("checkout -f svn/trunk -- %s" % TEST_CONFIG[VERSION_FILE], "", | 722 Git("checkout -f svn/trunk -- %s" % TEST_CONFIG[VERSION_FILE], "", |
735 cb=self.WriteFakeVersionFile), | 723 cb=self.WriteFakeVersionFile), |
736 Git("commit -aF \"%s\"" % TEST_CONFIG[COMMITMSG_FILE], "", | 724 Git("commit -aF \"%s\"" % TEST_CONFIG[COMMITMSG_FILE], "", |
(...skipping 15 matching lines...) Expand all Loading... |
752 Git("branch -D %s" % TEST_CONFIG[BRANCHNAME], ""), | 740 Git("branch -D %s" % TEST_CONFIG[BRANCHNAME], ""), |
753 Git("branch -D %s" % TEST_CONFIG[TRUNKBRANCH], ""), | 741 Git("branch -D %s" % TEST_CONFIG[TRUNKBRANCH], ""), |
754 ]) | 742 ]) |
755 | 743 |
756 # Expected keyboard input in manual mode: | 744 # Expected keyboard input in manual mode: |
757 if manual: | 745 if manual: |
758 self.ExpectReadline([ | 746 self.ExpectReadline([ |
759 RL("Y"), # Confirm last push. | 747 RL("Y"), # Confirm last push. |
760 RL(""), # Open editor. | 748 RL(""), # Open editor. |
761 RL("Y"), # Increment build number. | 749 RL("Y"), # Increment build number. |
762 RL("reviewer@chromium.org"), # V8 reviewer. | |
763 RL("LGTX"), # Enter LGTM for V8 CL (wrong). | |
764 RL("LGTM"), # Enter LGTM for V8 CL. | |
765 RL("Y"), # Sanity check. | 750 RL("Y"), # Sanity check. |
766 RL("reviewer@chromium.org"), # Chromium reviewer. | 751 RL("reviewer@chromium.org"), # Chromium reviewer. |
767 ]) | 752 ]) |
768 | 753 |
769 # Expected keyboard input in semi-automatic mode: | 754 # Expected keyboard input in semi-automatic mode and forced mode: |
770 if not manual and not force: | 755 if not manual: |
771 self.ExpectReadline([ | |
772 RL("LGTM"), # Enter LGTM for V8 CL. | |
773 ]) | |
774 | |
775 # No keyboard input in forced mode: | |
776 if force: | |
777 self.ExpectReadline([]) | 756 self.ExpectReadline([]) |
778 | 757 |
779 args = ["-a", "author@chromium.org", "-c", TEST_CONFIG[CHROMIUM]] | 758 args = ["-a", "author@chromium.org", "-c", TEST_CONFIG[CHROMIUM]] |
780 if force: args.append("-f") | 759 if force: args.append("-f") |
781 if manual: args.append("-m") | 760 if manual: args.append("-m") |
782 else: args += ["-r", "reviewer@chromium.org"] | 761 else: args += ["-r", "reviewer@chromium.org"] |
783 PushToTrunk(TEST_CONFIG, self).Run(args) | 762 PushToTrunk(TEST_CONFIG, self).Run(args) |
784 | 763 |
785 deps = FileToText(TEST_CONFIG[DEPS_FILE]) | 764 deps = FileToText(TEST_CONFIG[DEPS_FILE]) |
786 self.assertTrue(re.search("\"v8_revision\": \"123456\"", deps)) | 765 self.assertTrue(re.search("\"v8_revision\": \"123456\"", deps)) |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 | 1011 |
1033 Review URL: https://codereview.chromium.org/83173002 | 1012 Review URL: https://codereview.chromium.org/83173002 |
1034 | 1013 |
1035 ------------------------------------------------------------------------""") | 1014 ------------------------------------------------------------------------""") |
1036 self.assertEquals( | 1015 self.assertEquals( |
1037 """Prepare push to trunk. Now working on version 3.23.11. | 1016 """Prepare push to trunk. Now working on version 3.23.11. |
1038 | 1017 |
1039 R=danno@chromium.org | 1018 R=danno@chromium.org |
1040 | 1019 |
1041 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1020 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
OLD | NEW |