| 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 207cac45e8531584fb233430b0264e146fd452b0..505cbda2949c9baecc290a778245194e2ea64d1f 100644
|
| --- a/tools/push-to-trunk/test_scripts.py
|
| +++ b/tools/push-to-trunk/test_scripts.py
|
| @@ -643,7 +643,10 @@ Performance and stability improvements on all platforms."""
|
| TEST_CONFIG[CHANGELOG_FILE] = self.MakeEmptyTempFile()
|
| if not os.path.exists(TEST_CONFIG[CHROMIUM]):
|
| os.makedirs(TEST_CONFIG[CHROMIUM])
|
| - TextToFile("1999-04-05: Version 3.22.4", TEST_CONFIG[CHANGELOG_FILE])
|
| + old_change_log = """1999-04-05: Version 3.22.4
|
| +
|
| + Performance and stability improvements on all platforms.\n"""
|
| + TextToFile(old_change_log, TEST_CONFIG[CHANGELOG_FILE])
|
| TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line",
|
| TEST_CONFIG[DEPS_FILE])
|
| os.environ["EDITOR"] = "vi"
|
| @@ -660,6 +663,11 @@ Performance and stability improvements on all platforms."""
|
| version = FileToText(TEST_CONFIG[VERSION_FILE])
|
| self.assertTrue(re.search(r"#define BUILD_NUMBER\s+6", version))
|
|
|
| + def TrunkBranchSideEffects():
|
| + """On 'git co -b new_branch svn/trunk', the ChangLog will be reset to its
|
| + original content."""
|
| + TextToFile(old_change_log, TEST_CONFIG[CHANGELOG_FILE])
|
| +
|
| def CheckSVNCommit():
|
| commit = FileToText(TEST_CONFIG[COMMITMSG_FILE])
|
| self.assertEquals(
|
| @@ -675,6 +683,21 @@ Performance and stability improvements on all platforms.""", commit)
|
| self.assertTrue(re.search(r"#define PATCH_LEVEL\s+0", version))
|
| self.assertTrue(re.search(r"#define IS_CANDIDATE_VERSION\s+0", version))
|
|
|
| + # Check that the change log on the trunk branch got correctly modified.
|
| + change_log = FileToText(TEST_CONFIG[CHANGELOG_FILE])
|
| + self.assertEquals(
|
| +"""1999-07-31: Version 3.22.5
|
| +
|
| + Log text 1 (issue 321).
|
| +
|
| + Performance and stability improvements on all platforms.
|
| +
|
| +
|
| +1999-04-05: Version 3.22.4
|
| +
|
| + Performance and stability improvements on all platforms.\n""",
|
| + change_log)
|
| +
|
| force_flag = " -f" if not manual else ""
|
| review_suffix = "\n\nTBR=reviewer@chromium.org" if not manual else ""
|
| self.ExpectGit([
|
| @@ -711,10 +734,14 @@ Performance and stability improvements on all platforms.""", commit)
|
| Git(("log -1 --format=%H --grep=\"Prepare push to trunk. "
|
| "Now working on version 3.22.6.\""),
|
| "hash1\n"),
|
| - Git("diff --name-only svn/trunk hash1", "file1\nfile2\n"),
|
| + # The ChangeLog file will be one of the files with differences between
|
| + # trunk and bleeding edge.
|
| + Git("diff --name-only svn/trunk hash1",
|
| + "file1\n%s\nfile2\n" % TEST_CONFIG[CHANGELOG_FILE]),
|
| Git("diff svn/trunk hash1 file1 file2", "patch content"),
|
| Git("svn find-rev hash1", "123455\n"),
|
| - Git("checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], ""),
|
| + Git("checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], "",
|
| + cb=TrunkBranchSideEffects),
|
| Git("apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""),
|
| Git("add \"%s\"" % TEST_CONFIG[VERSION_FILE], ""),
|
| Git("commit -aF \"%s\"" % TEST_CONFIG[COMMITMSG_FILE], "",
|
|
|