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

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

Issue 725503003: Fix landing candidate pushes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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
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 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 force_flag = " -f" if not manual else "" 765 force_flag = " -f" if not manual else ""
766 expectations = [] 766 expectations = []
767 if not force: 767 if not force:
768 expectations.append(Cmd("which vi", "/usr/bin/vi")) 768 expectations.append(Cmd("which vi", "/usr/bin/vi"))
769 expectations += [ 769 expectations += [
770 Cmd("git status -s -uno", ""), 770 Cmd("git status -s -uno", ""),
771 Cmd("git status -s -b -uno", "## some_branch\n"), 771 Cmd("git status -s -b -uno", "## some_branch\n"),
772 Cmd("git fetch", ""), 772 Cmd("git fetch", ""),
773 Cmd("git branch", " branch1\n* branch2\n"), 773 Cmd("git branch", " branch1\n* branch2\n"),
774 Cmd("git branch", " branch1\n* branch2\n"), 774 Cmd("git branch", " branch1\n* branch2\n"),
775 Cmd("git config --get remote.origin.push", ""),
776 Cmd("git config --add remote.origin.push "
777 "refs/remotes/origin/candidates:refs/pending/heads/candidates", ""),
778 Cmd(("git new-branch %s --upstream origin/master" % 775 Cmd(("git new-branch %s --upstream origin/master" %
779 TEST_CONFIG["BRANCHNAME"]), 776 TEST_CONFIG["BRANCHNAME"]),
780 ""), 777 ""),
781 Cmd(("git log -1 --format=%H --grep=" 778 Cmd(("git log -1 --format=%H --grep="
782 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" " 779 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" "
783 "origin/candidates"), "hash2\n"), 780 "origin/candidates"), "hash2\n"),
784 Cmd("git log -1 hash2", "Log message\n"), 781 Cmd("git log -1 hash2", "Log message\n"),
785 ] 782 ]
786 if manual: 783 if manual:
787 expectations.append(RL("Y")) # Confirm last push. 784 expectations.append(RL("Y")) # Confirm last push.
(...skipping 28 matching lines...) Expand all
816 Cmd("git checkout -f origin/candidates -- ChangeLog", "", 813 Cmd("git checkout -f origin/candidates -- ChangeLog", "",
817 cb=ResetChangeLog), 814 cb=ResetChangeLog),
818 Cmd("git checkout -f origin/candidates -- src/version.cc", "", 815 Cmd("git checkout -f origin/candidates -- src/version.cc", "",
819 cb=self.WriteFakeVersionFile), 816 cb=self.WriteFakeVersionFile),
820 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "", 817 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "",
821 cb=CheckSVNCommit), 818 cb=CheckSVNCommit),
822 ] 819 ]
823 if manual: 820 if manual:
824 expectations.append(RL("Y")) # Sanity check. 821 expectations.append(RL("Y")) # Sanity check.
825 expectations += [ 822 expectations += [
826 Cmd("git push origin", ""), 823 Cmd("git cl land -f --bypass-hooks", ""),
827 Cmd("git fetch", ""), 824 Cmd("git fetch", ""),
828 Cmd("git log -1 --format=%H --grep=" 825 Cmd("git log -1 --format=%H --grep="
829 "\"Version 3.22.5 (based on push_hash)\"" 826 "\"Version 3.22.5 (based on push_hash)\""
830 " origin/candidates", "hsh_to_tag"), 827 " origin/candidates", "hsh_to_tag"),
831 Cmd("git tag 3.22.5 hsh_to_tag", ""), 828 Cmd("git tag 3.22.5 hsh_to_tag", ""),
832 Cmd("git push origin 3.22.5", ""), 829 Cmd("git push origin 3.22.5", ""),
833 Cmd("git checkout -f some_branch", ""), 830 Cmd("git checkout -f some_branch", ""),
834 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), 831 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
835 Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""), 832 Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""),
836 ] 833 ]
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 1507
1511 Review URL: https://codereview.chromium.org/83173002 1508 Review URL: https://codereview.chromium.org/83173002
1512 1509
1513 ------------------------------------------------------------------------""") 1510 ------------------------------------------------------------------------""")
1514 self.assertEquals( 1511 self.assertEquals(
1515 """Prepare push to trunk. Now working on version 3.23.11. 1512 """Prepare push to trunk. Now working on version 3.23.11.
1516 1513
1517 R=danno@chromium.org 1514 R=danno@chromium.org
1518 1515
1519 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1516 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body)
OLDNEW
« tools/push-to-trunk/push_to_trunk.py ('K') | « tools/push-to-trunk/push_to_trunk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698