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

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: More docu. 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
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 log -1 --format=%s", "Title"),
494 Cmd("git branch -r --contains HEAD", ""),
495 Cmd("git branch -r --contains HEAD^", " origin/candidates\n"),
496 Cmd("git fetch", ""),
497 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""),
498 Cmd("git fetch", ""),
499 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""),
500 Cmd("git fetch", ""),
501 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""),
502 Cmd("git fetch", ""),
503 Cmd("git log -1 --format=%H --grep=\"Title\" origin/candidates", ""),
504 ])
505 args = ["--branch", "candidates", "--vc-interface", "git_read_svn_write",
506 "12345"]
507 self._state["version"] = "tag_name"
508 self.assertRaises(Exception,
509 lambda: self.RunStep(MergeToBranch, TagRevision, args))
510
491 def testReadAndPersistVersion(self): 511 def testReadAndPersistVersion(self):
492 self.WriteFakeVersionFile(build=5) 512 self.WriteFakeVersionFile(build=5)
493 step = self.MakeStep() 513 step = self.MakeStep()
494 step.ReadAndPersistVersion() 514 step.ReadAndPersistVersion()
495 self.assertEquals("3", step["major"]) 515 self.assertEquals("3", step["major"])
496 self.assertEquals("22", step["minor"]) 516 self.assertEquals("22", step["minor"])
497 self.assertEquals("5", step["build"]) 517 self.assertEquals("5", step["build"])
498 self.assertEquals("0", step["patch"]) 518 self.assertEquals("0", step["patch"])
499 519
500 def testRegex(self): 520 def testRegex(self):
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 RL("Y"), # Automatically increment patch level? 1285 RL("Y"), # Automatically increment patch level?
1266 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], ""), 1286 Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], ""),
1267 RL("reviewer@chromium.org"), # V8 reviewer. 1287 RL("reviewer@chromium.org"), # V8 reviewer.
1268 Cmd("git cl upload --send-mail -r \"reviewer@chromium.org\" " 1288 Cmd("git cl upload --send-mail -r \"reviewer@chromium.org\" "
1269 "--bypass-hooks --cc \"ulan@chromium.org\"", ""), 1289 "--bypass-hooks --cc \"ulan@chromium.org\"", ""),
1270 Cmd("git checkout -f %s" % TEST_CONFIG["BRANCHNAME"], ""), 1290 Cmd("git checkout -f %s" % TEST_CONFIG["BRANCHNAME"], ""),
1271 RL("LGTM"), # Enter LGTM for V8 CL. 1291 RL("LGTM"), # Enter LGTM for V8 CL.
1272 Cmd("git cl presubmit", "Presubmit successfull\n"), 1292 Cmd("git cl presubmit", "Presubmit successfull\n"),
1273 Cmd("git cl dcommit -f --bypass-hooks", "Closing issue\n", 1293 Cmd("git cl dcommit -f --bypass-hooks", "Closing issue\n",
1274 cb=VerifySVNCommit), 1294 cb=VerifySVNCommit),
1275 Cmd("git svn tag 3.22.5.1 -m \"Tagging version 3.22.5.1\"", ""), 1295 Cmd("git log -1 --format=%s", "Unique title"),
1296 Cmd("git branch -r --contains HEAD", ""),
1297 Cmd("git branch -r --contains HEAD^",
1298 " origin/branch-heads/bleeding_edge\n origin/master\n"),
1299 Cmd("git fetch", ""),
1300 Cmd("git log -1 --format=%H --grep=\"Unique title\" origin/master", ""),
1301 Cmd("git fetch", ""),
1302 Cmd("git log -1 --format=%H --grep=\"Unique title\" origin/master",
1303 "hsh_to_tag"),
1304 Cmd("git tag 3.22.5.1 hsh_to_tag", ""),
1305 Cmd("git push origin 3.22.5.1", ""),
1276 Cmd("git checkout -f some_branch", ""), 1306 Cmd("git checkout -f some_branch", ""),
1277 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), 1307 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
1278 ]) 1308 ])
1279 1309
1280 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS 1310 # r12345 and r34567 are patches. r23456 (included) and r45678 are the MIPS
1281 # ports of r12345. r56789 is the MIPS port of r34567. 1311 # ports of r12345. r56789 is the MIPS port of r34567.
1282 args = ["-f", "-p", extra_patch, "--branch", "candidates", 1312 args = ["-f", "-p", extra_patch, "--branch", "candidates",
1283 "--vc-interface", "git_read_svn_write", "12345", "23456", "34567"] 1313 "--vc-interface", "git_read_svn_write", "12345", "23456", "34567"]
1284 1314
1285 # The first run of the script stops because of the svn being down. 1315 # The first run of the script stops because of the svn being down.
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 1695
1666 Review URL: https://codereview.chromium.org/83173002 1696 Review URL: https://codereview.chromium.org/83173002
1667 1697
1668 ------------------------------------------------------------------------""") 1698 ------------------------------------------------------------------------""")
1669 self.assertEquals( 1699 self.assertEquals(
1670 """Prepare push to trunk. Now working on version 3.23.11. 1700 """Prepare push to trunk. Now working on version 3.23.11.
1671 1701
1672 R=danno@chromium.org 1702 R=danno@chromium.org
1673 1703
1674 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1704 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body)
OLDNEW
« tools/push-to-trunk/git_recipes.py ('K') | « tools/push-to-trunk/merge_to_branch.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698