| 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 8b2e1d938b12e6a2321081d710b677e5776f218e..9107db97ec5762a8783f21536e935df1e2aade25 100644
|
| --- a/tools/push-to-trunk/test_scripts.py
|
| +++ b/tools/push-to-trunk/test_scripts.py
|
| @@ -31,9 +31,9 @@ import tempfile
|
| import traceback
|
| import unittest
|
|
|
| -import auto_roll
|
| -from auto_roll import CheckLastPush
|
| -from auto_roll import SETTINGS_LOCATION
|
| +import auto_push
|
| +from auto_push import CheckLastPush
|
| +from auto_push import SETTINGS_LOCATION
|
| import common_includes
|
| from common_includes import *
|
| import merge_to_branch
|
| @@ -67,9 +67,8 @@ TEST_CONFIG = {
|
| }
|
|
|
|
|
| -AUTO_ROLL_ARGS = [
|
| +AUTO_PUSH_ARGS = [
|
| "-a", "author@chromium.org",
|
| - "-c", TEST_CONFIG[CHROMIUM],
|
| "-r", "reviewer@chromium.org",
|
| ]
|
|
|
| @@ -840,13 +839,11 @@ Performance and stability improvements on all platforms.""", commit)
|
|
|
| self._state["lkgr"] = "101"
|
|
|
| - self.assertRaises(Exception, lambda: self.RunStep(auto_roll.AutoRoll,
|
| + self.assertRaises(Exception, lambda: self.RunStep(auto_push.AutoPush,
|
| CheckLastPush,
|
| - AUTO_ROLL_ARGS))
|
| + AUTO_PUSH_ARGS))
|
|
|
| - def testAutoRoll(self):
|
| - password = self.MakeEmptyTempFile()
|
| - TextToFile("PW", password)
|
| + def testAutoPush(self):
|
| TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
|
| TEST_CONFIG[SETTINGS_LOCATION] = "~/.doesnotexist"
|
|
|
| @@ -855,12 +852,6 @@ Performance and stability improvements on all platforms.""", commit)
|
| "{\"message\": \"Tree is throttled\"}"),
|
| URL("https://v8-status.appspot.com/lkgr", Exception("Network problem")),
|
| URL("https://v8-status.appspot.com/lkgr", "100"),
|
| - URL("https://v8-status.appspot.com/status",
|
| - ("username=v8-auto-roll%40chromium.org&"
|
| - "message=Tree+is+closed+%28preparing+to+push%29&password=PW"), ""),
|
| - URL("https://v8-status.appspot.com/status",
|
| - ("username=v8-auto-roll%40chromium.org&"
|
| - "message=Tree+is+throttled&password=PW"), ""),
|
| ])
|
|
|
| self.ExpectGit([
|
| @@ -874,18 +865,17 @@ Performance and stability improvements on all platforms.""", commit)
|
| "Version 3.4.5 (based on bleeding_edge revision r79)\n"),
|
| ])
|
|
|
| - auto_roll.AutoRoll(TEST_CONFIG, self).Run(
|
| - AUTO_ROLL_ARGS + ["--status-password", password, "--push"])
|
| + auto_push.AutoPush(TEST_CONFIG, self).Run(AUTO_PUSH_ARGS + ["--push"])
|
|
|
| state = json.loads(FileToText("%s-state.json"
|
| % TEST_CONFIG[PERSISTFILE_BASENAME]))
|
|
|
| self.assertEquals("100", state["lkgr"])
|
|
|
| - def testAutoRollStoppedBySettings(self):
|
| + def testAutoPushStoppedBySettings(self):
|
| TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
|
| TEST_CONFIG[SETTINGS_LOCATION] = self.MakeEmptyTempFile()
|
| - TextToFile("{\"enable_auto_roll\": false}", TEST_CONFIG[SETTINGS_LOCATION])
|
| + TextToFile("{\"enable_auto_push\": false}", TEST_CONFIG[SETTINGS_LOCATION])
|
|
|
| self.ExpectReadURL([])
|
|
|
| @@ -895,11 +885,11 @@ Performance and stability improvements on all platforms.""", commit)
|
| Git("svn fetch", ""),
|
| ])
|
|
|
| - def RunAutoRoll():
|
| - auto_roll.AutoRoll(TEST_CONFIG, self).Run(AUTO_ROLL_ARGS)
|
| - self.assertRaises(Exception, RunAutoRoll)
|
| + def RunAutoPush():
|
| + auto_push.AutoPush(TEST_CONFIG, self).Run(AUTO_PUSH_ARGS)
|
| + self.assertRaises(Exception, RunAutoPush)
|
|
|
| - def testAutoRollStoppedByTreeStatus(self):
|
| + def testAutoPushStoppedByTreeStatus(self):
|
| TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
|
| TEST_CONFIG[SETTINGS_LOCATION] = "~/.doesnotexist"
|
|
|
| @@ -914,9 +904,9 @@ Performance and stability improvements on all platforms.""", commit)
|
| Git("svn fetch", ""),
|
| ])
|
|
|
| - def RunAutoRoll():
|
| - auto_roll.AutoRoll(TEST_CONFIG, self).Run(AUTO_ROLL_ARGS)
|
| - self.assertRaises(Exception, RunAutoRoll)
|
| + def RunAutoPush():
|
| + auto_push.AutoPush(TEST_CONFIG, self).Run(AUTO_PUSH_ARGS)
|
| + self.assertRaises(Exception, RunAutoPush)
|
|
|
| def testMergeToBranch(self):
|
| TEST_CONFIG[ALREADY_MERGING_SENTINEL_FILE] = self.MakeEmptyTempFile()
|
|
|