Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: tools/push-to-trunk/auto_roll.py

Issue 540843002: Make lookup of last v8 roll work with pure git. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import json 7 import json
8 import os 8 import os
9 import sys 9 import sys
10 import urllib 10 import urllib
11 11
12 from common_includes import * 12 from common_includes import *
13 import chromium_roll 13 import chromium_roll
14 14
15 CLUSTERFUZZ_API_KEY_FILE = "CLUSTERFUZZ_API_KEY_FILE" 15 CLUSTERFUZZ_API_KEY_FILE = "CLUSTERFUZZ_API_KEY_FILE"
16 16
17 CONFIG = { 17 CONFIG = {
18 PERSISTFILE_BASENAME: "/tmp/v8-auto-roll-tempfile", 18 PERSISTFILE_BASENAME: "/tmp/v8-auto-roll-tempfile",
19 CLUSTERFUZZ_API_KEY_FILE: ".cf_api_key", 19 CLUSTERFUZZ_API_KEY_FILE: ".cf_api_key",
20 } 20 }
21 21
22 CR_DEPS_URL = 'http://src.chromium.org/svn/trunk/src/DEPS'
23 22
24 class CheckActiveRoll(Step): 23 class CheckActiveRoll(Step):
25 MESSAGE = "Check active roll." 24 MESSAGE = "Check active roll."
26 25
27 @staticmethod 26 @staticmethod
28 def ContainsChromiumRoll(changes): 27 def ContainsChromiumRoll(changes):
29 for change in changes: 28 for change in changes:
30 if change["subject"].startswith("Update V8 to"): 29 if change["subject"].startswith("Update V8 to"):
31 return True 30 return True
32 return False 31 return False
(...skipping 20 matching lines...) Expand all
53 push_hash = self.FindLastTrunkPush( 52 push_hash = self.FindLastTrunkPush(
54 branch="origin/master", include_patches=True) 53 branch="origin/master", include_patches=True)
55 self["last_push"] = self.GetCommitPositionNumber(push_hash) 54 self["last_push"] = self.GetCommitPositionNumber(push_hash)
56 55
57 56
58 class DetectLastRoll(Step): 57 class DetectLastRoll(Step):
59 MESSAGE = "Detect commit ID of the last Chromium roll." 58 MESSAGE = "Detect commit ID of the last Chromium roll."
60 59
61 def RunStep(self): 60 def RunStep(self):
62 # Interpret the DEPS file to retrieve the v8 revision. 61 # Interpret the DEPS file to retrieve the v8 revision.
62 # TODO(machenbach): This should be part or the roll-deps api of
63 # depot_tools.
63 Var = lambda var: '%s' 64 Var = lambda var: '%s'
64 exec(self.ReadURL(CR_DEPS_URL)) 65 exec(FileToText(os.path.join(self._options.chromium, "DEPS")))
65 last_roll = vars['v8_revision'] 66 last_roll = self.GetCommitPositionNumber(vars['v8_revision'])
66 # FIXME(machenbach): When rolling from bleeding edge and from trunk there 67 # FIXME(machenbach): When rolling from bleeding edge and from trunk there
67 # be different commit numbers here. Better use version? 68 # be different commit numbers here. Better use version?
68 if int(last_roll) >= int(self["last_push"]): 69 if int(last_roll) >= int(self["last_push"]):
69 print("There is no newer v8 revision than the one in Chromium (%s)." 70 print("There is no newer v8 revision than the one in Chromium (%s)."
70 % last_roll) 71 % last_roll)
71 return True 72 return True
72 73
73 74
74 class CheckClusterFuzz(Step): 75 class CheckClusterFuzz(Step):
75 MESSAGE = "Check ClusterFuzz api for new problems." 76 MESSAGE = "Check ClusterFuzz api for new problems."
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 CheckActiveRoll, 134 CheckActiveRoll,
134 DetectLastPush, 135 DetectLastPush,
135 DetectLastRoll, 136 DetectLastRoll,
136 CheckClusterFuzz, 137 CheckClusterFuzz,
137 RollChromium, 138 RollChromium,
138 ] 139 ]
139 140
140 141
141 if __name__ == "__main__": # pragma: no cover 142 if __name__ == "__main__": # pragma: no cover
142 sys.exit(AutoRoll(CONFIG).Run()) 143 sys.exit(AutoRoll(CONFIG).Run())
OLDNEW
« no previous file with comments | « no previous file | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698