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

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

Issue 103533003: Add last-push check to automatic push-to-trunk script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/auto_roll.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 ce90192dc19ac5fd572e6b826b9c0c4dae59f70e..8c0739770d0178fb7857ca0da4a3c36a767bf7f6 100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -35,6 +35,8 @@ from common_includes import *
import push_to_trunk
from push_to_trunk import *
import auto_roll
+from auto_roll import FetchLatestRevision
+from auto_roll import CheckLastPush
TEST_CONFIG = {
@@ -709,6 +711,16 @@ class ScriptTest(unittest.TestCase):
def testPushToTrunkForced(self):
self._PushToTrunk(force=True)
+ def testCheckLastPushRecently(self):
+ self.ExpectGit([
+ ["svn log -1 --oneline", "r101 | Text"],
+ ["svn log -1 --oneline ChangeLog", "r99 | Prepare push to trunk..."],
+ ])
+
+ state = {}
+ self.MakeStep(FetchLatestRevision, state=state).Run()
+ self.assertRaises(Exception, self.MakeStep(CheckLastPush, state=state).Run)
+
def testAutoRoll(self):
TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
@@ -722,6 +734,7 @@ class ScriptTest(unittest.TestCase):
["status -s -b -uno", "## some_branch\n"],
["svn fetch", ""],
["svn log -1 --oneline", "r101 | Text"],
+ ["svn log -1 --oneline ChangeLog", "r65 | Prepare push to trunk..."],
])
auto_roll.RunAutoRoll(TEST_CONFIG, MakeOptions(m=False, f=True), self)
« no previous file with comments | « tools/push-to-trunk/auto_roll.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698