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

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

Issue 130403006: Add tree control feature to auto-roll script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/common_includes.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 9ef57578750f5a59261f407a65724789baf975d7..56b44a6e4844a059dc41ec9d38cb172f15a02e6c 100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -58,7 +58,8 @@ TEST_CONFIG = {
}
-def MakeOptions(s=0, l=None, f=False, m=True, r=None, c=None):
+def MakeOptions(s=0, l=None, f=False, m=True, r=None, c=None,
+ status_password=None):
"""Convenience wrapper."""
class Options(object):
pass
@@ -69,6 +70,7 @@ def MakeOptions(s=0, l=None, f=False, m=True, r=None, c=None):
options.m = m
options.r = r
options.c = c
+ options.status_password = status_password
return options
@@ -304,8 +306,11 @@ class ScriptTest(unittest.TestCase):
def ReadLine(self):
return self._rl_mock.Call()
- def ReadURL(self, url):
- return self._url_mock.Call(url)
+ def ReadURL(self, url, params):
+ if params is not None:
+ return self._url_mock.Call(url, params)
+ else:
+ return self._url_mock.Call(url)
def Sleep(self, seconds):
pass
@@ -748,6 +753,8 @@ Performance and stability improvements on all platforms."""
self.assertRaises(Exception, self.MakeStep(CheckLastPush, state=state).Run)
def testAutoRoll(self):
+ status_password = self.MakeEmptyTempFile()
+ TextToFile("PW", status_password)
TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
TEST_CONFIG[SETTINGS_LOCATION] = "~/.doesnotexist"
@@ -756,20 +763,28 @@ Performance and stability improvements on all platforms."""
"{\"message\": \"Tree is throttled\"}"],
["https://v8-status.appspot.com/lkgr", Exception("Network problem")],
["https://v8-status.appspot.com/lkgr", "100"],
+ ["https://v8-status.appspot.com/status",
+ ("username=v8-auto-roll%40chromium.org&"
+ "message=Tree+is+closed+%28preparing+to+push%29&password=PW"),
+ ""],
+ ["https://v8-status.appspot.com/status",
+ ("username=v8-auto-roll%40chromium.org&"
+ "message=Tree+is+throttled&password=PW"), ""],
])
self.ExpectGit([
["status -s -uno", ""],
["status -s -b -uno", "## some_branch\n"],
["svn fetch", ""],
- ["svn log -1 --oneline", "r101 | Text"],
+ ["svn log -1 --oneline", "r100 | Text"],
["svn log -1 --oneline ChangeLog", "r65 | Prepare push to trunk..."],
])
- auto_roll.RunAutoRoll(TEST_CONFIG, AutoRollOptions(MakeOptions()), self)
+ auto_roll.RunAutoRoll(TEST_CONFIG, AutoRollOptions(
+ MakeOptions(status_password=status_password)), self)
self.assertEquals("100", self.MakeStep().Restore("lkgr"))
- self.assertEquals("101", self.MakeStep().Restore("latest"))
+ self.assertEquals("100", self.MakeStep().Restore("latest"))
def testAutoRollStoppedBySettings(self):
TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
« no previous file with comments | « tools/push-to-trunk/common_includes.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698