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 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 def _bumpUpVersion(self): | 1367 def _bumpUpVersion(self): |
1368 self.WriteFakeVersionFile() | 1368 self.WriteFakeVersionFile() |
1369 | 1369 |
1370 def ResetVersion(minor, build, patch=0): | 1370 def ResetVersion(minor, build, patch=0): |
1371 return lambda: self.WriteFakeVersionFile(minor=minor, | 1371 return lambda: self.WriteFakeVersionFile(minor=minor, |
1372 build=build, | 1372 build=build, |
1373 patch=patch) | 1373 patch=patch) |
1374 | 1374 |
1375 return [ | 1375 return [ |
1376 Cmd("git status -s -uno", ""), | 1376 Cmd("git status -s -uno", ""), |
1377 Cmd("git checkout -f bleeding_edge", "", cb=ResetVersion(11, 4)), | 1377 Cmd("git checkout -f master", "", cb=ResetVersion(11, 4)), |
1378 Cmd("git pull", ""), | 1378 Cmd("git pull", ""), |
1379 Cmd("git branch", ""), | 1379 Cmd("git branch", ""), |
1380 Cmd("git checkout -f bleeding_edge", ""), | 1380 Cmd("git checkout -f master", ""), |
1381 Cmd("git log -1 --format=%H", "latest_hash"), | 1381 Cmd("git log -1 --format=%H", "latest_hash"), |
1382 Cmd("git diff --name-only latest_hash latest_hash^", ""), | 1382 Cmd("git diff --name-only latest_hash latest_hash^", ""), |
1383 URL("https://v8-status.appspot.com/lkgr", "12345"), | 1383 URL("https://v8-status.appspot.com/lkgr", "12345"), |
1384 Cmd("git checkout -f bleeding_edge", ""), | 1384 Cmd("git checkout -f master", ""), |
1385 Cmd(("git log --format=%H --grep=" | 1385 Cmd(("git log --format=%H --grep=" |
1386 "\"^git-svn-id: [^@]*@12345 [A-Za-z0-9-]*$\""), | 1386 "\"^git-svn-id: [^@]*@12345 [A-Za-z0-9-]*$\""), |
1387 "lkgr_hash"), | 1387 "lkgr_hash"), |
1388 Cmd("git checkout -b auto-bump-up-version lkgr_hash", ""), | 1388 Cmd("git checkout -b auto-bump-up-version lkgr_hash", ""), |
1389 Cmd("git checkout -f bleeding_edge", ""), | 1389 Cmd("git checkout -f master", ""), |
1390 Cmd("git branch", ""), | 1390 Cmd("git branch", "auto-bump-up-version\n* master"), |
| 1391 Cmd("git branch -D auto-bump-up-version", ""), |
1391 Cmd("git diff --name-only lkgr_hash lkgr_hash^", ""), | 1392 Cmd("git diff --name-only lkgr_hash lkgr_hash^", ""), |
1392 Cmd("git checkout -f master", "", cb=ResetVersion(11, 5)), | 1393 Cmd("git checkout -f candidates", "", cb=ResetVersion(11, 5)), |
1393 Cmd("git pull", ""), | 1394 Cmd("git pull", ""), |
1394 URL("https://v8-status.appspot.com/current?format=json", | 1395 URL("https://v8-status.appspot.com/current?format=json", |
1395 "{\"message\": \"Tree is open\"}"), | 1396 "{\"message\": \"Tree is open\"}"), |
1396 Cmd("git checkout -b auto-bump-up-version bleeding_edge", "", | 1397 Cmd("git checkout -b auto-bump-up-version master", "", |
1397 cb=ResetVersion(11, 4)), | 1398 cb=ResetVersion(11, 4)), |
1398 Cmd("git commit -am \"[Auto-roll] Bump up version to 3.11.6.0\n\n" | 1399 Cmd("git commit -am \"[Auto-roll] Bump up version to 3.11.6.0\n\n" |
1399 "TBR=author@chromium.org\" " | 1400 "TBR=author@chromium.org\" " |
1400 "--author \"author@chromium.org <author@chromium.org>\"", ""), | 1401 "--author \"author@chromium.org <author@chromium.org>\"", ""), |
1401 ] | 1402 ] |
1402 | 1403 |
1403 def testBumpUpVersionGit(self): | 1404 def testBumpUpVersionGit(self): |
1404 expectations = self._bumpUpVersion() | 1405 expectations = self._bumpUpVersion() |
1405 expectations += [ | 1406 expectations += [ |
1406 Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f " | 1407 Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f " |
1407 "--bypass-hooks", ""), | 1408 "--bypass-hooks", ""), |
1408 Cmd("git cl dcommit -f --bypass-hooks", ""), | 1409 Cmd("git cl dcommit -f --bypass-hooks", ""), |
1409 Cmd("git checkout -f bleeding_edge", ""), | 1410 Cmd("git checkout -f master", ""), |
1410 Cmd("git branch", "auto-bump-up-version\n* bleeding_edge"), | 1411 Cmd("git branch", "auto-bump-up-version\n* master"), |
1411 Cmd("git branch -D auto-bump-up-version", ""), | 1412 Cmd("git branch -D auto-bump-up-version", ""), |
1412 ] | 1413 ] |
1413 self.Expect(expectations) | 1414 self.Expect(expectations) |
1414 | 1415 |
1415 BumpUpVersion(TEST_CONFIG, self).Run(["-a", "author@chromium.org"]) | 1416 BumpUpVersion(TEST_CONFIG, self).Run(["-a", "author@chromium.org"]) |
1416 | 1417 |
1417 def testBumpUpVersionSvn(self): | 1418 def testBumpUpVersionSvn(self): |
1418 svn_root = self.MakeEmptyTempDirectory() | 1419 svn_root = self.MakeEmptyTempDirectory() |
1419 expectations = self._bumpUpVersion() | 1420 expectations = self._bumpUpVersion() |
1420 expectations += [ | 1421 expectations += [ |
1421 Cmd("git diff HEAD^ HEAD", "patch content"), | 1422 Cmd("git diff HEAD^ HEAD", "patch content"), |
1422 Cmd("svn update", "", cwd=svn_root), | 1423 Cmd("svn update", "", cwd=svn_root), |
1423 Cmd("svn status", "", cwd=svn_root), | 1424 Cmd("svn status", "", cwd=svn_root), |
1424 Cmd("patch -d branches/bleeding_edge -p1 -i %s" % | 1425 Cmd("patch -d branches/bleeding_edge -p1 -i %s" % |
1425 TEST_CONFIG["PATCH_FILE"], "Applied patch...", cwd=svn_root), | 1426 TEST_CONFIG["PATCH_FILE"], "Applied patch...", cwd=svn_root), |
1426 Cmd("svn commit --non-interactive --username=author@chromium.org " | 1427 Cmd("svn commit --non-interactive --username=author@chromium.org " |
1427 "--config-dir=[CONFIG_DIR] " | 1428 "--config-dir=[CONFIG_DIR] " |
1428 "-m \"[Auto-roll] Bump up version to 3.11.6.0\"", | 1429 "-m \"[Auto-roll] Bump up version to 3.11.6.0\"", |
1429 "", cwd=svn_root), | 1430 "", cwd=svn_root), |
1430 Cmd("git checkout -f bleeding_edge", ""), | 1431 Cmd("git checkout -f master", ""), |
1431 Cmd("git branch", "auto-bump-up-version\n* bleeding_edge"), | 1432 Cmd("git branch", "auto-bump-up-version\n* master"), |
1432 Cmd("git branch -D auto-bump-up-version", ""), | 1433 Cmd("git branch -D auto-bump-up-version", ""), |
1433 ] | 1434 ] |
1434 self.Expect(expectations) | 1435 self.Expect(expectations) |
1435 | 1436 |
1436 BumpUpVersion(TEST_CONFIG, self).Run( | 1437 BumpUpVersion(TEST_CONFIG, self).Run( |
1437 ["-a", "author@chromium.org", | 1438 ["-a", "author@chromium.org", |
1438 "--svn", svn_root, | 1439 "--svn", svn_root, |
1439 "--svn-config", "[CONFIG_DIR]"]) | 1440 "--svn-config", "[CONFIG_DIR]"]) |
1440 | 1441 |
1441 def testAutoTag(self): | 1442 def testAutoTag(self): |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 | 1540 |
1540 Review URL: https://codereview.chromium.org/83173002 | 1541 Review URL: https://codereview.chromium.org/83173002 |
1541 | 1542 |
1542 ------------------------------------------------------------------------""") | 1543 ------------------------------------------------------------------------""") |
1543 self.assertEquals( | 1544 self.assertEquals( |
1544 """Prepare push to trunk. Now working on version 3.23.11. | 1545 """Prepare push to trunk. Now working on version 3.23.11. |
1545 | 1546 |
1546 R=danno@chromium.org | 1547 R=danno@chromium.org |
1547 | 1548 |
1548 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1549 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
OLD | NEW |