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

Unified Diff: tools/push-to-trunk/test_scripts.py

Issue 139993006: Show v8 bleeding edge revision in trunk and Chromium commit message. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Show revision also in Chromium commit message. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/push-to-trunk/push_to_trunk.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py
index a8200ee265eb38d5bb84ccc7ab5cdd0721756993..90f484911d12f64a0078135c31e76e27af900442 100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -28,6 +28,7 @@
import os
import tempfile
+import traceback
import unittest
import common_includes
@@ -247,7 +248,11 @@ class SimpleMock(object):
# The expectation list contains a mandatory return value and an optional
# callback for checking the context at the time of the call.
if len(expected_call) == len(args) + 2:
- expected_call[len(args) + 1]()
+ try:
+ expected_call[len(args) + 1]()
+ except:
+ tb = traceback.format_exc()
+ raise NoRetryException("Caught exception from callback: %s" % tb)
return_value = expected_call[len(args)]
# If the return value is an exception, raise it instead of returning.
@@ -563,6 +568,7 @@ class ScriptTest(unittest.TestCase):
self.ExpectGit([
["diff svn/trunk hash1", "patch content"],
+ ["svn find-rev hash1", "123455\n"],
])
self.MakeStep().Persist("prepare_commit_hash", "hash1")
@@ -581,7 +587,7 @@ class ScriptTest(unittest.TestCase):
Chromium issue 12345
Performance and stability improvements on all platforms.\n"""
- commit_msg = """Version 3.22.5
+ commit_msg = """Version 3.22.5 (based on bleeding_edge revision r123455)
Log text 1. Chromium issue 12345
@@ -595,7 +601,7 @@ Performance and stability improvements on all platforms."""
12345).
Performance and stability improvements on all platforms.\n"""
- commit_msg = """Version 3.22.5
+ commit_msg = """Version 3.22.5 (based on bleeding_edge revision r123455)
Long commit message that fills more than 80 characters (Chromium issue 12345).
@@ -631,13 +637,14 @@ Performance and stability improvements on all platforms."""
version = FileToText(TEST_CONFIG[VERSION_FILE])
self.assertTrue(re.search(r"#define BUILD_NUMBER\s+6", version))
- def CheckUpload():
- cl = FileToText(TEST_CONFIG[CHANGELOG_FILE])
-
def CheckSVNCommit():
commit = FileToText(TEST_CONFIG[COMMITMSG_FILE])
- self.assertTrue(re.search(r"Version 3.22.5", commit))
- self.assertTrue(re.search(r"Log text 1 \(issue 321\).", commit))
+ self.assertEquals(
+"""Version 3.22.5 (based on bleeding_edge revision r123455)
+
+Log text 1 (issue 321).
+
+Performance and stability improvements on all platforms.""", commit)
version = FileToText(TEST_CONFIG[VERSION_FILE])
self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version))
self.assertTrue(re.search(r"#define BUILD_NUMBER\s+5", version))
@@ -676,6 +683,7 @@ Performance and stability improvements on all platforms."""
"Now working on version 3.22.6.\""),
"hash1\n"],
["diff svn/trunk hash1", "patch content\n"],
+ ["svn find-rev hash1", "123455\n"],
["checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], ""],
["apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""],
["add \"%s\"" % TEST_CONFIG[VERSION_FILE], ""],
@@ -686,7 +694,8 @@ Performance and stability improvements on all platforms."""
["checkout master", ""],
["pull", ""],
["checkout -b v8-roll-123456", ""],
- [("commit -am \"Update V8 to version 3.22.5.\n\n"
+ [("commit -am \"Update V8 to version 3.22.5 "
+ "(based on bleeding_edge revision r123455).\n\n"
"TBR=reviewer@chromium.org\""),
""],
["cl upload --send-mail%s" % force_flag, ""],
« 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