| 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)
|
|
|