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

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

Issue 169843002: Retrieve bleeding edge push revision from trunk commit message. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. Created 6 years, 10 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 "Review URL: https://codereview.chromium.org/9876543210\n")], 475 "Review URL: https://codereview.chromium.org/9876543210\n")],
476 ["log -1 rev4 --format=\"%an\"", "author4@chromium.org"], 476 ["log -1 rev4 --format=\"%an\"", "author4@chromium.org"],
477 ]) 477 ])
478 478
479 # The cl for rev4 on rietveld has an updated LOG flag. 479 # The cl for rev4 on rietveld has an updated LOG flag.
480 self.ExpectReadURL([ 480 self.ExpectReadURL([
481 ["https://codereview.chromium.org/9876543210/description", 481 ["https://codereview.chromium.org/9876543210/description",
482 "Title\n\nBUG=456\nLOG=N\n\n"], 482 "Title\n\nBUG=456\nLOG=N\n\n"],
483 ]) 483 ])
484 484
485 self._state["last_push"] = "1234" 485 self._state["last_push_bleeding_edge"] = "1234"
486 self.MakeStep(PrepareChangeLog).Run() 486 self.MakeStep(PrepareChangeLog).Run()
487 487
488 actual_cl = FileToText(TEST_CONFIG[CHANGELOG_ENTRY_FILE]) 488 actual_cl = FileToText(TEST_CONFIG[CHANGELOG_ENTRY_FILE])
489 489
490 expected_cl = """1999-07-31: Version 3.22.5 490 expected_cl = """1999-07-31: Version 3.22.5
491 491
492 Title text 1. 492 Title text 1.
493 493
494 Title text 3 (Chromium issue 321). 494 Title text 3 (Chromium issue 321).
495 495
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 review_suffix = "\n\nTBR=reviewer@chromium.org" if not manual else "" 661 review_suffix = "\n\nTBR=reviewer@chromium.org" if not manual else ""
662 self.ExpectGit([ 662 self.ExpectGit([
663 ["status -s -uno", ""], 663 ["status -s -uno", ""],
664 ["status -s -b -uno", "## some_branch\n"], 664 ["status -s -b -uno", "## some_branch\n"],
665 ["svn fetch", ""], 665 ["svn fetch", ""],
666 ["branch", " branch1\n* branch2\n"], 666 ["branch", " branch1\n* branch2\n"],
667 ["checkout -b %s" % TEST_CONFIG[TEMP_BRANCH], ""], 667 ["checkout -b %s" % TEST_CONFIG[TEMP_BRANCH], ""],
668 ["branch", " branch1\n* branch2\n"], 668 ["branch", " branch1\n* branch2\n"],
669 ["branch", " branch1\n* branch2\n"], 669 ["branch", " branch1\n* branch2\n"],
670 ["checkout -b %s svn/bleeding_edge" % TEST_CONFIG[BRANCHNAME], ""], 670 ["checkout -b %s svn/bleeding_edge" % TEST_CONFIG[BRANCHNAME], ""],
671 ["log -1 --format=%H ChangeLog", "1234\n"], 671 [("log -1 --format=%H --grep="
672 ["log -1 1234", "Last push ouput\n"], 672 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" "
673 ["log 1234..HEAD --format=%H", "rev1\n"], 673 "svn/trunk"), "hash2\n"],
674 ["log -1 hash2", "Log message\n"],
675 ["log -1 --format=%s hash2",
676 "Version 3.4.5 (based on bleeding_edge revision r1234)\n"],
677 ["svn find-rev r1234", "hash3\n"],
678 ["log hash3..HEAD --format=%H", "rev1\n"],
674 ["log -1 rev1 --format=\"%s\"", "Log text 1.\n"], 679 ["log -1 rev1 --format=\"%s\"", "Log text 1.\n"],
675 ["log -1 rev1 --format=\"%B\"", "Text\nLOG=YES\nBUG=v8:321\nText\n"], 680 ["log -1 rev1 --format=\"%B\"", "Text\nLOG=YES\nBUG=v8:321\nText\n"],
676 ["log -1 rev1 --format=\"%an\"", "author1@chromium.org\n"], 681 ["log -1 rev1 --format=\"%an\"", "author1@chromium.org\n"],
677 [("commit -a -m \"Prepare push to trunk. " 682 [("commit -a -m \"Prepare push to trunk. "
678 "Now working on version 3.22.6.%s\"" % review_suffix), 683 "Now working on version 3.22.6.%s\"" % review_suffix),
679 " 2 files changed\n", 684 " 2 files changed\n",
680 CheckPreparePush], 685 CheckPreparePush],
681 [("cl upload --email \"author@chromium.org\" " 686 [("cl upload --email \"author@chromium.org\" "
682 "-r \"reviewer@chromium.org\" --send-mail%s" % force_flag), 687 "-r \"reviewer@chromium.org\" --send-mail%s" % force_flag),
683 "done\n"], 688 "done\n"],
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 ["https://v8-status.appspot.com/status", 794 ["https://v8-status.appspot.com/status",
790 ("username=v8-auto-roll%40chromium.org&" 795 ("username=v8-auto-roll%40chromium.org&"
791 "message=Tree+is+throttled&password=PW"), ""], 796 "message=Tree+is+throttled&password=PW"), ""],
792 ]) 797 ])
793 798
794 self.ExpectGit([ 799 self.ExpectGit([
795 ["status -s -uno", ""], 800 ["status -s -uno", ""],
796 ["status -s -b -uno", "## some_branch\n"], 801 ["status -s -b -uno", "## some_branch\n"],
797 ["svn fetch", ""], 802 ["svn fetch", ""],
798 ["svn log -1 --oneline", "r100 | Text"], 803 ["svn log -1 --oneline", "r100 | Text"],
799 ["svn log -1 --oneline ChangeLog", "r65 | Prepare push to trunk..."], 804 [("log -1 --format=%H --grep=\""
805 "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\""
806 " svn/trunk"), "push_hash\n"],
807 ["svn find-rev push_hash", "65"],
800 ]) 808 ])
801 809
802 auto_roll.RunAutoRoll(TEST_CONFIG, AutoRollOptions( 810 auto_roll.RunAutoRoll(TEST_CONFIG, AutoRollOptions(
803 MakeOptions(status_password=status_password)), self) 811 MakeOptions(status_password=status_password)), self)
804 812
805 state = json.loads(FileToText("%s-state.json" 813 state = json.loads(FileToText("%s-state.json"
806 % TEST_CONFIG[PERSISTFILE_BASENAME])) 814 % TEST_CONFIG[PERSISTFILE_BASENAME]))
807 815
808 self.assertEquals("100", state["lkgr"]) 816 self.assertEquals("100", state["lkgr"])
809 self.assertEquals("100", state["latest"]) 817 self.assertEquals("100", state["latest"])
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 998
991 Review URL: https://codereview.chromium.org/83173002 999 Review URL: https://codereview.chromium.org/83173002
992 1000
993 ------------------------------------------------------------------------""") 1001 ------------------------------------------------------------------------""")
994 self.assertEquals( 1002 self.assertEquals(
995 """Prepare push to trunk. Now working on version 3.23.11. 1003 """Prepare push to trunk. Now working on version 3.23.11.
996 1004
997 R=danno@chromium.org 1005 R=danno@chromium.org
998 1006
999 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1007 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