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

Unified Diff: tools/release/test_scripts.py

Issue 1465413002: [release] Add monitoring state to auto-roller json output. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review Created 5 years, 1 month 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/release/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/release/test_scripts.py
diff --git a/tools/release/test_scripts.py b/tools/release/test_scripts.py
index 23ee0b115ba2265d1382d41852f91c08e84eaed7..efe5ea90b8af671d02abd69b916bcc90b9048940 100644
--- a/tools/release/test_scripts.py
+++ b/tools/release/test_scripts.py
@@ -1031,6 +1031,7 @@ deps = {
def testChromiumRollUpToDate(self):
TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
+ json_output_file = os.path.join(TEST_CONFIG["CHROMIUM"], "out.json")
TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS"))
self.Expect([
Cmd("git fetch origin", ""),
@@ -1047,12 +1048,18 @@ deps = {
])
result = auto_roll.AutoRoll(TEST_CONFIG, self).Run(
- AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"]])
+ AUTO_PUSH_ARGS + [
+ "-c", TEST_CONFIG["CHROMIUM"],
+ "--json-output", json_output_file])
self.assertEquals(0, result)
+ json_output = json.loads(FileToText(json_output_file))
+ self.assertEquals("up_to_date", json_output["monitoring_state"])
+
def testChromiumRoll(self):
# Setup fake directory structures.
TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
+ json_output_file = os.path.join(TEST_CONFIG["CHROMIUM"], "out.json")
TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS"))
TextToFile("", os.path.join(TEST_CONFIG["CHROMIUM"], ".git"))
chrome_dir = TEST_CONFIG["CHROMIUM"]
@@ -1096,12 +1103,15 @@ deps = {
self.Expect(expectations)
args = ["-a", "author@chromium.org", "-c", chrome_dir,
- "-r", "reviewer@chromium.org"]
+ "-r", "reviewer@chromium.org", "--json-output", json_output_file]
auto_roll.AutoRoll(TEST_CONFIG, self).Run(args)
deps = FileToText(os.path.join(chrome_dir, "DEPS"))
self.assertTrue(re.search("\"v8_revision\": \"22624\"", deps))
+ json_output = json.loads(FileToText(json_output_file))
+ self.assertEquals("success", json_output["monitoring_state"])
+
def testCheckLastPushRecently(self):
self.Expect([
Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
« no previous file with comments | « tools/release/common_includes.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698