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

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

Issue 607893004: Add tag write access to merge script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review. Created 6 years, 2 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
« no previous file with comments | « tools/push-to-trunk/push_to_trunk.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 fetch", ""),
494 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""),
495 Cmd("git fetch", ""),
496 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""),
497 Cmd("git fetch", ""),
498 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""),
499 Cmd("git fetch", ""),
500 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""),
501 ])
502 args = ["--branch", "candidates", "--vc-interface", "git_read_svn_write",
503 "12345"]
504 self._state["version"] = "tag_name"
505 self._state["commit_title"] = "Title"
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
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 fetch", ""),
1280 Cmd("git svn fetch", ""), 1298 Cmd("git log -1 --format=%H --grep=\""
1281 Cmd("git rebase origin/candidates", ""), 1299 "Version 3.22.5.1 (merged r12345, r23456, r34567, r45678, r56789)"
1282 Cmd("git svn tag 3.22.5.1 -m \"Tagging version 3.22.5.1\"", ""), 1300 "\" origin/candidates",
1301 ""),
1302 Cmd("git fetch", ""),
1303 Cmd("git log -1 --format=%H --grep=\""
1304 "Version 3.22.5.1 (merged r12345, r23456, r34567, r45678, r56789)"
1305 "\" origin/candidates",
1306 "hsh_to_tag"),
1307 Cmd("git tag 3.22.5.1 hsh_to_tag", ""),
1308 Cmd("git push origin 3.22.5.1", ""),
1283 Cmd("git checkout -f some_branch", ""), 1309 Cmd("git checkout -f some_branch", ""),
1284 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), 1310 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
1285 ]) 1311 ])
1286 1312
1287 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS 1313 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS
1288 # ports of r12345. r56789 is the MIPS port of r34567. 1314 # ports of r12345. r56789 is the MIPS port of r34567.
1289 args = ["-f", "-p", extra_patch, "--branch", "candidates", 1315 args = ["-f", "-p", extra_patch, "--branch", "candidates",
1290 "--vc-interface", "git_read_svn_write", "12345", "23456", "34567"] 1316 "--vc-interface", "git_read_svn_write", "12345", "23456", "34567"]
1291 1317
1292 # The first run of the script stops because of the svn being down. 1318 # 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
1674 1700
1675 Review URL: https://codereview.chromium.org/83173002 1701 Review URL: https://codereview.chromium.org/83173002
1676 1702
1677 ------------------------------------------------------------------------""") 1703 ------------------------------------------------------------------------""")
1678 self.assertEquals( 1704 self.assertEquals(
1679 """Prepare push to trunk. Now working on version 3.23.11. 1705 """Prepare push to trunk. Now working on version 3.23.11.
1680 1706
1681 R=danno@chromium.org 1707 R=danno@chromium.org
1682 1708
1683 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1709 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body)
OLDNEW
« no previous file with comments | « 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