| Index: tools/release/test_scripts.py
|
| diff --git a/tools/release/test_scripts.py b/tools/release/test_scripts.py
|
| index eb02719a5c53d38567ada88f15eacfd0d99f1ac5..23ee0b115ba2265d1382d41852f91c08e84eaed7 100644
|
| --- a/tools/release/test_scripts.py
|
| +++ b/tools/release/test_scripts.py
|
| @@ -1003,7 +1003,7 @@ git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@123456 123
|
|
|
| """
|
|
|
| - ROLL_COMMIT_MSG = """Update V8 to version 3.22.4 (based on abc).
|
| + ROLL_COMMIT_MSG = """Update V8 to version 3.22.4.
|
|
|
| Summary of changes available at:
|
| https://chromium.googlesource.com/v8/v8/+log/last_rol..roll_hsh
|
| @@ -1017,16 +1017,47 @@ This only works with a Google account.
|
|
|
| TBR=reviewer@chromium.org"""
|
|
|
| + # Snippet from the original DEPS file.
|
| + FAKE_DEPS = """
|
| +vars = {
|
| + "v8_revision": "last_roll_hsh",
|
| +}
|
| +deps = {
|
| + "src/v8":
|
| + (Var("googlecode_url") % "v8") + "/" + Var("v8_branch") + "@" +
|
| + Var("v8_revision"),
|
| +}
|
| +"""
|
| +
|
| + def testChromiumRollUpToDate(self):
|
| + TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
|
| + TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS"))
|
| + self.Expect([
|
| + Cmd("git fetch origin", ""),
|
| + Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
|
| + Cmd("git describe --tags last_roll_hsh", "3.22.4"),
|
| + Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
|
| + Cmd("git rev-list --max-age=740800 --tags",
|
| + "bad_tag\nroll_hsh\nhash_123"),
|
| + Cmd("git describe --tags bad_tag", ""),
|
| + Cmd("git describe --tags roll_hsh", "3.22.4"),
|
| + Cmd("git describe --tags hash_123", "3.22.3"),
|
| + Cmd("git describe --tags roll_hsh", "3.22.4"),
|
| + Cmd("git describe --tags hash_123", "3.22.3"),
|
| + ])
|
| +
|
| + result = auto_roll.AutoRoll(TEST_CONFIG, self).Run(
|
| + AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"]])
|
| + self.assertEquals(0, result)
|
| +
|
| def testChromiumRoll(self):
|
| # Setup fake directory structures.
|
| TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
|
| + TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS"))
|
| TextToFile("", os.path.join(TEST_CONFIG["CHROMIUM"], ".git"))
|
| chrome_dir = TEST_CONFIG["CHROMIUM"]
|
| os.makedirs(os.path.join(chrome_dir, "v8"))
|
|
|
| - # Write fake deps file.
|
| - TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line",
|
| - os.path.join(chrome_dir, "DEPS"))
|
| def WriteDeps():
|
| TextToFile("Some line\n \"v8_revision\": \"22624\",\n some line",
|
| os.path.join(chrome_dir, "DEPS"))
|
| @@ -1034,8 +1065,15 @@ TBR=reviewer@chromium.org"""
|
| expectations = [
|
| Cmd("git fetch origin", ""),
|
| Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
|
| - Cmd("git log -1 --format=%s roll_hsh",
|
| - "Version 3.22.4 (based on abc)\n"),
|
| + Cmd("git describe --tags last_roll_hsh", "3.22.3.1"),
|
| + Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
|
| + Cmd("git rev-list --max-age=740800 --tags",
|
| + "bad_tag\nroll_hsh\nhash_123"),
|
| + Cmd("git describe --tags bad_tag", ""),
|
| + Cmd("git describe --tags roll_hsh", "3.22.4"),
|
| + Cmd("git describe --tags hash_123", "3.22.3"),
|
| + Cmd("git describe --tags roll_hsh", "3.22.4"),
|
| + Cmd("git log -1 --format=%s roll_hsh", "Version 3.22.4\n"),
|
| Cmd("git describe --tags roll_hsh", "3.22.4"),
|
| Cmd("git describe --tags last_roll_hsh", "3.22.2.1"),
|
| Cmd("git status -s -uno", "", cwd=chrome_dir),
|
| @@ -1050,18 +1088,16 @@ TBR=reviewer@chromium.org"""
|
| "--author \"author@chromium.org <author@chromium.org>\"" %
|
| self.ROLL_COMMIT_MSG),
|
| "", cwd=chrome_dir),
|
| - Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f", "",
|
| - cwd=chrome_dir),
|
| + Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f "
|
| + "--use-commit-queue", "", cwd=chrome_dir),
|
| Cmd("git checkout -f master", "", cwd=chrome_dir),
|
| Cmd("git branch -D work-branch", "", cwd=chrome_dir),
|
| ]
|
| self.Expect(expectations)
|
|
|
| args = ["-a", "author@chromium.org", "-c", chrome_dir,
|
| - "-r", "reviewer@chromium.org",
|
| - "--last-roll", "last_roll_hsh",
|
| - "roll_hsh"]
|
| - ChromiumRoll(TEST_CONFIG, self).Run(args)
|
| + "-r", "reviewer@chromium.org"]
|
| + auto_roll.AutoRoll(TEST_CONFIG, self).Run(args)
|
|
|
| deps = FileToText(os.path.join(chrome_dir, "DEPS"))
|
| self.assertTrue(re.search("\"v8_revision\": \"22624\"", deps))
|
| @@ -1100,56 +1136,6 @@ TBR=reviewer@chromium.org"""
|
|
|
| self.assertEquals("abc123", state["candidate"])
|
|
|
| - # Snippet from the original DEPS file.
|
| - FAKE_DEPS = """
|
| -vars = {
|
| - "v8_revision": "abcd123455",
|
| -}
|
| -deps = {
|
| - "src/v8":
|
| - (Var("googlecode_url") % "v8") + "/" + Var("v8_branch") + "@" +
|
| - Var("v8_revision"),
|
| -}
|
| -"""
|
| -
|
| - def testAutoRollUpToDate(self):
|
| - TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
|
| - TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS"))
|
| - self.Expect([
|
| - Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
|
| - Cmd("git rev-list --max-age=740800 --tags",
|
| - "bad_tag\nhash_234\nhash_123"),
|
| - Cmd("git describe --tags bad_tag", ""),
|
| - Cmd("git describe --tags hash_234", "3.22.4"),
|
| - Cmd("git describe --tags hash_123", "3.22.3"),
|
| - Cmd("git describe --tags abcd123455", "3.22.4"),
|
| - Cmd("git describe --tags hash_234", "3.22.4"),
|
| - Cmd("git describe --tags hash_123", "3.22.3"),
|
| - ])
|
| -
|
| - result = auto_roll.AutoRoll(TEST_CONFIG, self).Run(
|
| - AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"]])
|
| - self.assertEquals(0, result)
|
| -
|
| - def testAutoRoll(self):
|
| - TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
|
| - TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS"))
|
| -
|
| - self.Expect([
|
| - Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
|
| - Cmd("git rev-list --max-age=740800 --tags",
|
| - "bad_tag\nhash_234\nhash_123"),
|
| - Cmd("git describe --tags bad_tag", ""),
|
| - Cmd("git describe --tags hash_234", "3.22.4"),
|
| - Cmd("git describe --tags hash_123", "3.22.3"),
|
| - Cmd("git describe --tags abcd123455", "3.22.3.1"),
|
| - Cmd("git describe --tags hash_234", "3.22.4"),
|
| - ])
|
| -
|
| - result = auto_roll.AutoRoll(TEST_CONFIG, self).Run(
|
| - AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"], "--roll"])
|
| - self.assertEquals(0, result)
|
| -
|
| def testMergeToBranch(self):
|
| TEST_CONFIG["ALREADY_MERGING_SENTINEL_FILE"] = self.MakeEmptyTempFile()
|
| TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git"))
|
|
|