Refactoring: Remove more legacy from release scripts.

- Remove an unused feature that allowed to check for required
  data before each script step.
- Use a relative path to the version file. In the production
  environment, this will point to the cwd/version_file, while
  in the test environment it is fake_cwd/version_file.

TBR=tandrii@chromium.org

Review URL: https://codereview.chromium.org/591783003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
machenbach@chromium.org 2014-09-23 09:35:49 +00:00
parent 9583236d84
commit a77dfb1ac6
7 changed files with 57 additions and 82 deletions

View File

@ -11,7 +11,6 @@ from common_includes import *
CONFIG = {
BRANCHNAME: "auto-tag-v8",
PERSISTFILE_BASENAME: "/tmp/v8-auto-tag-tempfile",
VERSION_FILE: "src/version.cc",
}
@ -54,7 +53,7 @@ class GetOldestUntaggedVersion(Step):
format="%H", grep="\\[Auto\\-roll\\] Bump up version to").splitlines():
# Get the version.
if not self.GitCheckoutFileSafe(self._config[VERSION_FILE], git_hash):
if not self.GitCheckoutFileSafe(VERSION_FILE, git_hash):
continue
self.ReadAndPersistVersion()
@ -65,7 +64,7 @@ class GetOldestUntaggedVersion(Step):
version = version[:-2]
# Clean up checked-out version file.
self.GitCheckoutFileSafe(self._config[VERSION_FILE], "HEAD")
self.GitCheckoutFileSafe(VERSION_FILE, "HEAD")
if version in tags:
if self["candidate"]:

View File

@ -28,7 +28,6 @@ from common_includes import *
CONFIG = {
PERSISTFILE_BASENAME: "/tmp/v8-bump-up-version-tempfile",
PATCH_FILE: "/tmp/v8-bump-up-version-tempfile-patch-file",
VERSION_FILE: "src/version.cc",
}
VERSION_BRANCH = "auto-bump-up-version"
@ -73,7 +72,7 @@ class LastChangeBailout(Step):
MESSAGE = "Stop script if the last change modified the version."
def RunStep(self):
if self._config[VERSION_FILE] in self.GitChangedFiles(self["latest"]):
if VERSION_FILE in self.GitChangedFiles(self["latest"]):
print "Stop due to recent version change."
return True
@ -122,7 +121,7 @@ class LKGRVersionUpToDateBailout(Step):
def RunStep(self):
# If a version-change commit becomes the lkgr, don't bump up the version
# again.
if self._config[VERSION_FILE] in self.GitChangedFiles(self["lkgr"]):
if VERSION_FILE in self.GitChangedFiles(self["lkgr"]):
print "Stop because the lkgr is a version change itself."
return True
@ -194,7 +193,7 @@ class ChangeVersion(Step):
def RunStep(self):
self.GitCreateBranch(VERSION_BRANCH, "bleeding_edge")
self.SetVersion(self.Config(VERSION_FILE), "new_")
self.SetVersion(os.path.join(self.default_cwd, VERSION_FILE), "new_")
try:
msg = "[Auto-roll] Bump up version to %s" % self["new_version"]

View File

@ -47,12 +47,13 @@ from git_recipes import GitFailedException
PERSISTFILE_BASENAME = "PERSISTFILE_BASENAME"
BRANCHNAME = "BRANCHNAME"
VERSION_FILE = "VERSION_FILE"
CHANGELOG_FILE = "CHANGELOG_FILE"
CHANGELOG_ENTRY_FILE = "CHANGELOG_ENTRY_FILE"
COMMITMSG_FILE = "COMMITMSG_FILE"
PATCH_FILE = "PATCH_FILE"
VERSION_FILE = os.path.join("src", "version.cc")
# V8 base directory.
DEFAULT_CWD = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
@ -262,9 +263,8 @@ class NoRetryException(Exception):
class Step(GitRecipesMixin):
def __init__(self, text, requires, number, config, state, options, handler):
def __init__(self, text, number, config, state, options, handler):
self._text = text
self._requires = requires
self._number = number
self._config = config
self._state = state
@ -298,10 +298,6 @@ class Step(GitRecipesMixin):
if not self._state and os.path.exists(state_file):
self._state.update(json.loads(FileToText(state_file)))
# Skip step if requirement is not met.
if self._requires and not self._state.get(self._requires):
return
print ">>> Step %d: %s" % (self._number, self._text)
try:
return self.RunStep()
@ -457,7 +453,7 @@ class Step(GitRecipesMixin):
if match:
value = match.group(1)
self["%s%s" % (prefix, var_name)] = value
for line in LinesInFile(self._config[VERSION_FILE]):
for line in LinesInFile(os.path.join(self.default_cwd, VERSION_FILE)):
for (var_name, def_name) in [("major", "MAJOR_VERSION"),
("minor", "MINOR_VERSION"),
("build", "BUILD_NUMBER"),
@ -604,12 +600,8 @@ def MakeStep(step_class=Step, number=0, state=None, config=None,
message = step_class.MESSAGE
except AttributeError:
message = step_class.__name__
try:
requires = step_class.REQUIRES
except AttributeError:
requires = None
return step_class(message, requires, number=number, config=config,
return step_class(message, number=number, config=config,
state=state, options=options,
handler=side_effect_handler)

View File

@ -41,7 +41,6 @@ CONFIG = {
PERSISTFILE_BASENAME: "/tmp/v8-merge-to-branch-tempfile",
ALREADY_MERGING_SENTINEL_FILE:
"/tmp/v8-merge-to-branch-tempfile-already-merging",
VERSION_FILE: "src/version.cc",
TEMPORARY_PATCH_FILE: "/tmp/v8-prepare-merge-tempfile-temporary-patch",
COMMITMSG_FILE: "/tmp/v8-prepare-merge-tempfile-commitmsg",
COMMIT_HASHES_FILE: "/tmp/v8-merge-to-branch-tempfile-PATCH_COMMIT_HASHES",
@ -184,14 +183,14 @@ class IncrementVersion(Step):
if self.Confirm("Automatically increment PATCH_LEVEL? (Saying 'n' will "
"fire up your EDITOR on %s so you can make arbitrary "
"changes. When you're done, save the file and exit your "
"EDITOR.)" % self.Config(VERSION_FILE)):
text = FileToText(self.Config(VERSION_FILE))
"EDITOR.)" % VERSION_FILE):
text = FileToText(os.path.join(self.default_cwd, VERSION_FILE))
text = MSub(r"(?<=#define PATCH_LEVEL)(?P<space>\s+)\d*$",
r"\g<space>%s" % new_patch,
text)
TextToFile(text, self.Config(VERSION_FILE))
TextToFile(text, os.path.join(self.default_cwd, VERSION_FILE))
else:
self.Editor(self.Config(VERSION_FILE))
self.Editor(os.path.join(self.default_cwd, VERSION_FILE))
self.ReadAndPersistVersion("new_")
self["version"] = "%s.%s.%s.%s" % (self["new_major"],
self["new_minor"],

View File

@ -40,7 +40,6 @@ CONFIG = {
BRANCHNAME: "prepare-push",
TRUNKBRANCH: "trunk-push",
PERSISTFILE_BASENAME: "/tmp/v8-push-to-trunk-tempfile",
VERSION_FILE: "src/version.cc",
CHANGELOG_FILE: "ChangeLog",
CHANGELOG_ENTRY_FILE: "/tmp/v8-push-to-trunk-tempfile-changelog-entry",
PATCH_FILE: "/tmp/v8-push-to-trunk-tempfile-patch-file",
@ -50,7 +49,6 @@ CONFIG = {
PUSH_MESSAGE_SUFFIX = " (based on bleeding_edge revision r%d)"
PUSH_MESSAGE_RE = re.compile(r".* \(based on bleeding_edge revision r(\d+)\)$")
class Preparation(Step):
MESSAGE = "Preparation."
@ -130,7 +128,7 @@ class GetCurrentBleedingEdgeVersion(Step):
MESSAGE = "Get latest bleeding edge version."
def RunStep(self):
self.GitCheckoutFile(self.Config(VERSION_FILE), "svn/bleeding_edge")
self.GitCheckoutFile(VERSION_FILE, "svn/bleeding_edge")
# Store latest version.
self.ReadAndPersistVersion("latest_")
@ -143,7 +141,7 @@ class IncrementVersion(Step):
def RunStep(self):
# Retrieve current version from last trunk push.
self.GitCheckoutFile(self.Config(VERSION_FILE), self["last_push_trunk"])
self.GitCheckoutFile(VERSION_FILE, self["last_push_trunk"])
self.ReadAndPersistVersion()
self["trunk_version"] = self.ArrayToVersion("")
@ -154,21 +152,21 @@ class IncrementVersion(Step):
if SortingKey(self["trunk_version"]) < SortingKey(self["latest_version"]):
# If the version on bleeding_edge is newer than on trunk, use it.
self.GitCheckoutFile(self.Config(VERSION_FILE), "svn/bleeding_edge")
self.GitCheckoutFile(VERSION_FILE, "svn/bleeding_edge")
self.ReadAndPersistVersion()
if self.Confirm(("Automatically increment BUILD_NUMBER? (Saying 'n' will "
"fire up your EDITOR on %s so you can make arbitrary "
"changes. When you're done, save the file and exit your "
"EDITOR.)" % self.Config(VERSION_FILE))):
"EDITOR.)" % VERSION_FILE)):
text = FileToText(self.Config(VERSION_FILE))
text = FileToText(os.path.join(self.default_cwd, VERSION_FILE))
text = MSub(r"(?<=#define BUILD_NUMBER)(?P<space>\s+)\d*$",
r"\g<space>%s" % str(int(self["build"]) + 1),
text)
TextToFile(text, self.Config(VERSION_FILE))
TextToFile(text, os.path.join(self.default_cwd, VERSION_FILE))
else:
self.Editor(self.Config(VERSION_FILE))
self.Editor(os.path.join(self.default_cwd, VERSION_FILE))
# Variables prefixed with 'new_' contain the new version numbers for the
# ongoing trunk push.
@ -336,8 +334,8 @@ class SetVersion(Step):
def RunStep(self):
# The version file has been modified by the patch. Reset it to the version
# on trunk and apply the correct version.
self.GitCheckoutFile(self.Config(VERSION_FILE), "svn/trunk")
self.SetVersion(self.Config(VERSION_FILE), "new_")
self.GitCheckoutFile(VERSION_FILE, "svn/trunk")
self.SetVersion(os.path.join(self.default_cwd, VERSION_FILE), "new_")
class CommitTrunk(Step):
@ -356,7 +354,7 @@ class SanityCheck(Step):
# prepare push process.
if not self.Confirm("Please check if your local checkout is sane: Inspect "
"%s, compile, run tests. Do you want to commit this new trunk "
"revision to the repository?" % self.Config(VERSION_FILE)):
"revision to the repository?" % VERSION_FILE):
self.Die("Execution canceled.") # pragma: no cover

View File

@ -25,7 +25,6 @@ CHROMIUM = "CHROMIUM"
CONFIG = {
BRANCHNAME: "retrieve-v8-releases",
PERSISTFILE_BASENAME: "/tmp/v8-releases-tempfile",
VERSION_FILE: "src/version.cc",
}
# Expression for retrieving the bleeding edge revision from a commit message.
@ -206,11 +205,11 @@ class RetrieveV8Releases(Step):
releases = []
try:
for git_hash in self.GitLog(format="%H").splitlines():
if self._config[VERSION_FILE] not in self.GitChangedFiles(git_hash):
if VERSION_FILE not in self.GitChangedFiles(git_hash):
continue
if self.ExceedsMax(releases):
break # pragma: no cover
if not self.GitCheckoutFileSafe(self._config[VERSION_FILE], git_hash):
if not self.GitCheckoutFileSafe(VERSION_FILE, git_hash):
break # pragma: no cover
release, patch_level = self.GetRelease(git_hash, branch)
@ -228,7 +227,7 @@ class RetrieveV8Releases(Step):
pass
# Clean up checked-out version file.
self.GitCheckoutFileSafe(self._config[VERSION_FILE], "HEAD")
self.GitCheckoutFileSafe(VERSION_FILE, "HEAD")
return releases
def RunStep(self):

View File

@ -60,7 +60,6 @@ TEST_CONFIG = {
BRANCHNAME: "test-prepare-push",
TRUNKBRANCH: "test-trunk-push",
PERSISTFILE_BASENAME: "/tmp/test-v8-push-to-trunk-tempfile",
VERSION_FILE: None,
CHANGELOG_FILE: None,
CHANGELOG_ENTRY_FILE: "/tmp/test-v8-push-to-trunk-tempfile-changelog-entry",
PATCH_FILE: "/tmp/test-v8-push-to-trunk-tempfile-patch",
@ -362,7 +361,10 @@ class ScriptTest(unittest.TestCase):
def WriteFakeVersionFile(self, minor=22, build=4, patch=0):
with open(TEST_CONFIG[VERSION_FILE], "w") as f:
version_file = os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE)
if not os.path.exists(os.path.dirname(version_file)):
os.makedirs(os.path.dirname(version_file))
with open(version_file, "w") as f:
f.write(" // Some line...\n")
f.write("\n")
f.write("#define MAJOR_VERSION 3\n")
@ -491,7 +493,6 @@ class ScriptTest(unittest.TestCase):
self.MakeStep().InitialEnvironmentChecks(TEST_CONFIG["DEFAULT_CWD"])
def testReadAndPersistVersion(self):
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self.WriteFakeVersionFile(build=5)
step = self.MakeStep()
step.ReadAndPersistVersion()
@ -531,7 +532,6 @@ class ScriptTest(unittest.TestCase):
self.assertEquals("push_hash", self._state["push_hash"])
def testPrepareChangeLog(self):
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self.WriteFakeVersionFile()
TEST_CONFIG[CHANGELOG_ENTRY_FILE] = self.MakeEmptyTempFile()
@ -607,16 +607,14 @@ class ScriptTest(unittest.TestCase):
# Version on trunk: 3.22.4.0. Version on master (bleeding_edge): 3.22.6.
# Make sure that the increment is 3.22.7.0.
def testIncrementVersion(self):
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self.WriteFakeVersionFile()
self._state["last_push_trunk"] = "hash1"
self._state["latest_build"] = "6"
self._state["latest_version"] = "3.22.6.0"
self.Expect([
Cmd("git checkout -f hash1 -- %s" % TEST_CONFIG[VERSION_FILE], ""),
Cmd(("git checkout -f svn/bleeding_edge -- %s" %
TEST_CONFIG[VERSION_FILE]),
Cmd("git checkout -f hash1 -- src/version.cc", ""),
Cmd("git checkout -f svn/bleeding_edge -- src/version.cc",
"", cb=lambda: self.WriteFakeVersionFile(22, 6)),
RL("Y"), # Increment build number.
])
@ -685,7 +683,6 @@ Performance and stability improvements on all platforms."""
# The version file on bleeding edge has build level 5, while the version
# file from trunk has build level 4.
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self.WriteFakeVersionFile(build=5)
TEST_CONFIG[CHANGELOG_ENTRY_FILE] = self.MakeEmptyTempFile()
@ -714,7 +711,8 @@ Performance and stability improvements on all platforms."""
Log text 1 (issue 321).
Performance and stability improvements on all platforms.""", commit)
version = FileToText(TEST_CONFIG[VERSION_FILE])
version = FileToText(
os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE))
self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version))
self.assertTrue(re.search(r"#define BUILD_NUMBER\s+5", version))
self.assertFalse(re.search(r"#define BUILD_NUMBER\s+6", version))
@ -760,10 +758,9 @@ Performance and stability improvements on all platforms.""", commit)
Cmd("git log -1 --format=%s hash2",
"Version 3.4.5 (based on bleeding_edge revision r1234)\n"),
Cmd("git svn find-rev r1234", "hash3\n"),
Cmd(("git checkout -f svn/bleeding_edge -- %s" %
TEST_CONFIG[VERSION_FILE]),
Cmd("git checkout -f svn/bleeding_edge -- src/version.cc",
"", cb=self.WriteFakeVersionFile),
Cmd("git checkout -f hash2 -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f hash2 -- src/version.cc", "",
cb=self.WriteFakeVersionFile),
]
if manual:
@ -788,7 +785,7 @@ Performance and stability improvements on all platforms.""", commit)
Cmd("git apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""),
Cmd("git checkout -f svn/trunk -- %s" % TEST_CONFIG[CHANGELOG_FILE], "",
cb=ResetChangeLog),
Cmd("git checkout -f svn/trunk -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f svn/trunk -- src/version.cc", "",
cb=self.WriteFakeVersionFile),
Cmd("git commit -aF \"%s\"" % TEST_CONFIG[COMMITMSG_FILE], "",
cb=CheckSVNCommit),
@ -1043,7 +1040,6 @@ deps = {
def testMergeToBranch(self):
TEST_CONFIG[ALREADY_MERGING_SENTINEL_FILE] = self.MakeEmptyTempFile()
TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git"))
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self.WriteFakeVersionFile(build=5)
os.environ["EDITOR"] = "vi"
extra_patch = self.MakeEmptyTempFile()
@ -1071,7 +1067,8 @@ LOG=N
def VerifySVNCommit():
commit = FileToText(TEST_CONFIG[COMMITMSG_FILE])
self.assertEquals(msg, commit)
version = FileToText(TEST_CONFIG[VERSION_FILE])
version = FileToText(
os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE))
self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version))
self.assertTrue(re.search(r"#define BUILD_NUMBER\s+5", version))
self.assertTrue(re.search(r"#define PATCH_LEVEL\s+1", version))
@ -1223,7 +1220,6 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
"""
json_output = self.MakeEmptyTempFile()
csv_output = self.MakeEmptyTempFile()
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self.WriteFakeVersionFile()
TEST_CONFIG[CHROMIUM] = self.MakeEmptyTempDirectory()
@ -1253,37 +1249,37 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
Cmd("git reset --hard svn/3.3", ""),
Cmd("git log --format=%H", "hash1\nhash2"),
Cmd("git diff --name-only hash1 hash1^", ""),
Cmd("git diff --name-only hash2 hash2^", TEST_CONFIG[VERSION_FILE]),
Cmd("git checkout -f hash2 -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git diff --name-only hash2 hash2^", VERSION_FILE),
Cmd("git checkout -f hash2 -- %s" % VERSION_FILE, "",
cb=ResetVersion(3, 1, 1)),
Cmd("git log -1 --format=%B hash2",
"Version 3.3.1.1 (merged 12)\n\nReview URL: fake.com\n"),
Cmd("git log -1 --format=%s hash2", ""),
Cmd("git svn find-rev hash2", "234"),
Cmd("git log -1 --format=%ci hash2", "18:15"),
Cmd("git checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
cb=ResetVersion(22, 5)),
Cmd("git reset --hard svn/3.21", ""),
Cmd("git log --format=%H", "hash3\nhash4\nhash5\n"),
Cmd("git diff --name-only hash3 hash3^", TEST_CONFIG[VERSION_FILE]),
Cmd("git checkout -f hash3 -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git diff --name-only hash3 hash3^", VERSION_FILE),
Cmd("git checkout -f hash3 -- %s" % VERSION_FILE, "",
cb=ResetVersion(21, 2)),
Cmd("git log -1 --format=%B hash3", ""),
Cmd("git log -1 --format=%s hash3", ""),
Cmd("git svn find-rev hash3", "123"),
Cmd("git log -1 --format=%ci hash3", "03:15"),
Cmd("git checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
cb=ResetVersion(22, 5)),
Cmd("git reset --hard svn/trunk", ""),
Cmd("git log --format=%H", "hash6\n"),
Cmd("git diff --name-only hash6 hash6^", TEST_CONFIG[VERSION_FILE]),
Cmd("git checkout -f hash6 -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git diff --name-only hash6 hash6^", VERSION_FILE),
Cmd("git checkout -f hash6 -- %s" % VERSION_FILE, "",
cb=ResetVersion(22, 3)),
Cmd("git log -1 --format=%B hash6", ""),
Cmd("git log -1 --format=%s hash6", ""),
Cmd("git svn find-rev hash6", "345"),
Cmd("git log -1 --format=%ci hash6", ""),
Cmd("git checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
cb=ResetVersion(22, 5)),
Cmd("git reset --hard svn/bleeding_edge", ""),
Cmd("svn log https://v8.googlecode.com/svn/tags -v --limit 20",
@ -1371,7 +1367,6 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
def _bumpUpVersion(self):
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self.WriteFakeVersionFile()
def ResetVersion(minor, build, patch=0):
@ -1445,7 +1440,6 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
"--svn-config", "[CONFIG_DIR]"])
def testAutoTag(self):
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self.WriteFakeVersionFile()
def ResetVersion(minor, build, patch=0):
@ -1467,17 +1461,17 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
Cmd(("git log --format=%H --grep="
"\"\\[Auto\\-roll\\] Bump up version to\""),
"hash125\nhash118\nhash111\nhash101"),
Cmd("git checkout -f hash125 -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f hash125 -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 4)),
Cmd("git checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 5)),
Cmd("git checkout -f hash118 -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f hash118 -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 3)),
Cmd("git checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 5)),
Cmd("git checkout -f hash111 -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f hash111 -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 2)),
Cmd("git checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 5)),
URL("https://v8-status.appspot.com/revisions?format=json",
"[{\"revision\": \"126\", \"status\": true},"
@ -1497,12 +1491,10 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
# Test that we bail out if the last change was a version change.
def testBumpUpVersionBailout1(self):
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self._state["latest"] = "latest_hash"
self.Expect([
Cmd("git diff --name-only latest_hash latest_hash^",
TEST_CONFIG[VERSION_FILE]),
Cmd("git diff --name-only latest_hash latest_hash^", VERSION_FILE),
])
self.assertEquals(0,
@ -1510,12 +1502,10 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
# Test that we bail out if the lkgr was a version change.
def testBumpUpVersionBailout2(self):
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self._state["lkgr"] = "lkgr_hash"
self.Expect([
Cmd("git diff --name-only lkgr_hash lkgr_hash^",
TEST_CONFIG[VERSION_FILE]),
Cmd("git diff --name-only lkgr_hash lkgr_hash^", VERSION_FILE),
])
self.assertEquals(0,
@ -1524,7 +1514,6 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
# Test that we bail out if the last version is already newer than the lkgr's
# version.
def testBumpUpVersionBailout3(self):
TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
self._state["lkgr"] = "lkgr_hash"
self._state["lkgr_version"] = "3.22.4.0"
self._state["latest_version"] = "3.22.5.0"