CLUSTERFUZZ_API_KEY_FILE: ".cf_api_key",
}
-CR_DEPS_URL = 'http://src.chromium.org/svn/trunk/src/DEPS'
class CheckActiveRoll(Step):
MESSAGE = "Check active roll."
def RunStep(self):
# Interpret the DEPS file to retrieve the v8 revision.
+ # TODO(machenbach): This should be part or the roll-deps api of
+ # depot_tools.
Var = lambda var: '%s'
- exec(self.ReadURL(CR_DEPS_URL))
- last_roll = vars['v8_revision']
+ exec(FileToText(os.path.join(self._options.chromium, "DEPS")))
+ last_roll = self.GetCommitPositionNumber(vars['v8_revision'])
# FIXME(machenbach): When rolling from bleeding edge and from trunk there
# be different commit numbers here. Better use version?
if int(last_roll) >= int(self["last_push"]):
"""
+ C_V8_123455_LOG = """V8 CL.
+
+git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@123455 123
+
+"""
+
C_V8_123456_LOG = """V8 CL.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@123456 123
# Snippet from the original DEPS file.
FAKE_DEPS = """
vars = {
- "v8_revision": "123455",
+ "v8_revision": "abcd123455",
}
deps = {
"src/v8":
"""
def testAutoRollUpToDate(self):
+ os.makedirs(TEST_CONFIG[CHROMIUM])
+ TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG[CHROMIUM], "DEPS"))
self.Expect([
URL("https://codereview.chromium.org/search",
"owner=author%40chromium.org&limit=30&closed=3&format=json",
"\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" "
"origin/master"), "push_hash\n"),
Cmd("git log -1 --format=%B push_hash", self.C_V8_22624_LOG),
- URL("http://src.chromium.org/svn/trunk/src/DEPS",
- self.FAKE_DEPS),
+ Cmd("git log -1 --format=%B abcd123455", self.C_V8_123455_LOG),
])
result = auto_roll.AutoRoll(TEST_CONFIG, self).Run(
self.assertEquals(1, result)
def testAutoRoll(self):
+ os.makedirs(TEST_CONFIG[CHROMIUM])
+ TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG[CHROMIUM], "DEPS"))
TEST_CONFIG[CLUSTERFUZZ_API_KEY_FILE] = self.MakeEmptyTempFile()
TextToFile("fake key", TEST_CONFIG[CLUSTERFUZZ_API_KEY_FILE])
"\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" "
"origin/master"), "push_hash\n"),
Cmd("git log -1 --format=%B push_hash", self.C_V8_123456_LOG),
- URL("http://src.chromium.org/svn/trunk/src/DEPS",
- self.FAKE_DEPS),
+ Cmd("git log -1 --format=%B abcd123455", self.C_V8_123455_LOG),
])
result = auto_roll.AutoRoll(TEST_CONFIG, self).Run(