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

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

Issue 157543002: A64: Synchronize with r18581. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: 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 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 cd65a2bdbbb65f3efe9b0aefc36f1ed3d953b546..9ef57578750f5a59261f407a65724789baf975d7 100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -38,6 +38,7 @@ import auto_roll
from auto_roll import AutoRollOptions
from auto_roll import CheckLastPush
from auto_roll import FetchLatestRevision
+from auto_roll import SETTINGS_LOCATION
TEST_CONFIG = {
@@ -53,6 +54,7 @@ TEST_CONFIG = {
COMMITMSG_FILE: "/tmp/test-v8-push-to-trunk-tempfile-commitmsg",
CHROMIUM: "/tmp/test-v8-push-to-trunk-tempfile-chromium",
DEPS_FILE: "/tmp/test-v8-push-to-trunk-tempfile-chromium/DEPS",
+ SETTINGS_LOCATION: None,
}
@@ -658,7 +660,8 @@ Performance and stability improvements on all platforms."""
CheckPreparePush],
["cl upload -r \"reviewer@chromium.org\" --send-mail%s" % force_flag,
"done\n"],
- ["cl dcommit -f", "Closing issue\n"],
+ ["cl presubmit", "Presubmit successfull\n"],
+ ["cl dcommit -f --bypass-hooks", "Closing issue\n"],
["svn fetch", "fetch result\n"],
["checkout svn/bleeding_edge", ""],
[("log -1 --format=%H --grep=\"Prepare push to trunk. "
@@ -746,8 +749,11 @@ Performance and stability improvements on all platforms."""
def testAutoRoll(self):
TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
+ TEST_CONFIG[SETTINGS_LOCATION] = "~/.doesnotexist"
self.ExpectReadURL([
+ ["https://v8-status.appspot.com/current?format=json",
+ "{\"message\": \"Tree is throttled\"}"],
["https://v8-status.appspot.com/lkgr", Exception("Network problem")],
["https://v8-status.appspot.com/lkgr", "100"],
])
@@ -760,13 +766,46 @@ Performance and stability improvements on all platforms."""
["svn log -1 --oneline ChangeLog", "r65 | Prepare push to trunk..."],
])
- auto_roll.RunAutoRoll(TEST_CONFIG,
- AutoRollOptions(MakeOptions(m=False, f=True)),
- self)
+ auto_roll.RunAutoRoll(TEST_CONFIG, AutoRollOptions(MakeOptions()), self)
self.assertEquals("100", self.MakeStep().Restore("lkgr"))
self.assertEquals("101", self.MakeStep().Restore("latest"))
+ def testAutoRollStoppedBySettings(self):
+ TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
+ TEST_CONFIG[SETTINGS_LOCATION] = self.MakeEmptyTempFile()
+ TextToFile("{\"enable_auto_roll\": false}", TEST_CONFIG[SETTINGS_LOCATION])
+
+ self.ExpectReadURL([])
+
+ self.ExpectGit([
+ ["status -s -uno", ""],
+ ["status -s -b -uno", "## some_branch\n"],
+ ["svn fetch", ""],
+ ])
+
+ def RunAutoRoll():
+ auto_roll.RunAutoRoll(TEST_CONFIG, AutoRollOptions(MakeOptions()), self)
+ self.assertRaises(Exception, RunAutoRoll)
+
+ def testAutoRollStoppedByTreeStatus(self):
+ TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
+ TEST_CONFIG[SETTINGS_LOCATION] = "~/.doesnotexist"
+
+ self.ExpectReadURL([
+ ["https://v8-status.appspot.com/current?format=json",
+ "{\"message\": \"Tree is throttled (no push)\"}"],
+ ])
+
+ self.ExpectGit([
+ ["status -s -uno", ""],
+ ["status -s -b -uno", "## some_branch\n"],
+ ["svn fetch", ""],
+ ])
+
+ def RunAutoRoll():
+ auto_roll.RunAutoRoll(TEST_CONFIG, AutoRollOptions(MakeOptions()), self)
+ self.assertRaises(Exception, RunAutoRoll)
class SystemTest(unittest.TestCase):
def testReload(self):
« 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