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

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

Issue 504443005: Keep chromium checkout up to date in auto roller. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 return script(TEST_CONFIG, self, self._state).RunSteps([step_class], args) 361 return script(TEST_CONFIG, self, self._state).RunSteps([step_class], args)
362 362
363 def GitMock(self, cmd, args="", pipe=True): 363 def GitMock(self, cmd, args="", pipe=True):
364 print "%s %s" % (cmd, args) 364 print "%s %s" % (cmd, args)
365 return self._git_mock.Call("git", args) 365 return self._git_mock.Call("git", args)
366 366
367 def LogMock(self, cmd, args=""): 367 def LogMock(self, cmd, args=""):
368 print "Log: %s %s" % (cmd, args) 368 print "Log: %s %s" % (cmd, args)
369 369
370 MOCKS = { 370 MOCKS = {
371 "gclient": GitMock, # TODO(machenbach): Yet another hack. Unify all mocks.
371 "git": GitMock, 372 "git": GitMock,
372 "roll-dep": GitMock, # TODO(machenbach): Yet another hack. Unify all mocks. 373 "roll-dep": GitMock, # TODO(machenbach): Yet another hack. Unify all mocks.
373 # TODO(machenbach): Little hack to reuse the git mock for the one svn call 374 # TODO(machenbach): Little hack to reuse the git mock for the one svn call
374 # in merge-to-branch. The command should be made explicit in the test 375 # in merge-to-branch. The command should be made explicit in the test
375 # expectations. 376 # expectations.
376 "svn": GitMock, 377 "svn": GitMock,
377 "vi": LogMock, 378 "vi": LogMock,
378 } 379 }
379 380
380 def Call(self, fun, *args, **kwargs): 381 def Call(self, fun, *args, **kwargs):
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 Git("status -s -b -uno", "## some_branch\n"), 847 Git("status -s -b -uno", "## some_branch\n"),
847 Git("svn fetch", ""), 848 Git("svn fetch", ""),
848 Git(("log -1 --format=%H --grep=" 849 Git(("log -1 --format=%H --grep="
849 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" " 850 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" "
850 "svn/trunk"), "push_hash\n"), 851 "svn/trunk"), "push_hash\n"),
851 Git("svn find-rev push_hash", "123455\n"), 852 Git("svn find-rev push_hash", "123455\n"),
852 Git("log -1 --format=%s push_hash", 853 Git("log -1 --format=%s push_hash",
853 "Version 3.22.5 (based on bleeding_edge revision r123454)\n"), 854 "Version 3.22.5 (based on bleeding_edge revision r123454)\n"),
854 Git("status -s -uno", ""), 855 Git("status -s -uno", ""),
855 Git("checkout -f master", ""), 856 Git("checkout -f master", ""),
856 Git("pull", ""), 857 Git("sync --no-hooks", "syncing..."),
857 Git("checkout -b v8-roll-123455", ""), 858 Git("checkout -b v8-roll-123455", ""),
858 Git("v8 123455", "rolled", cb=WriteDeps), 859 Git("v8 123455", "rolled", cb=WriteDeps),
859 Git(("commit -am \"Update V8 to version 3.22.5 " 860 Git(("commit -am \"Update V8 to version 3.22.5 "
860 "(based on bleeding_edge revision r123454).\n\n" 861 "(based on bleeding_edge revision r123454).\n\n"
861 "Please reply to the V8 sheriff c_name@chromium.org in " 862 "Please reply to the V8 sheriff c_name@chromium.org in "
862 "case of problems.\n\nTBR=c_name@chromium.org\""), 863 "case of problems.\n\nTBR=c_name@chromium.org\""),
863 ""), 864 ""),
864 Git(("cl upload --send-mail --email \"author@chromium.org\"%s" 865 Git(("cl upload --send-mail --email \"author@chromium.org\"%s"
865 % force_flag), ""), 866 % force_flag), ""),
866 ]) 867 ])
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 1524
1524 Review URL: https://codereview.chromium.org/83173002 1525 Review URL: https://codereview.chromium.org/83173002
1525 1526
1526 ------------------------------------------------------------------------""") 1527 ------------------------------------------------------------------------""")
1527 self.assertEquals( 1528 self.assertEquals(
1528 """Prepare push to trunk. Now working on version 3.23.11. 1529 """Prepare push to trunk. Now working on version 3.23.11.
1529 1530
1530 R=danno@chromium.org 1531 R=danno@chromium.org
1531 1532
1532 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1533 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body)
OLDNEW
« tools/push-to-trunk/chromium_roll.py ('K') | « tools/push-to-trunk/chromium_roll.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698