| Index: tools/roll_webgl_conformance.py
|
| diff --git a/tools/roll_angle.py b/tools/roll_webgl_conformance.py
|
| similarity index 85%
|
| copy from tools/roll_angle.py
|
| copy to tools/roll_webgl_conformance.py
|
| index 751d4ac72eff3ae37276eee309ef8ce78ecd27b8..0c40fefc3cb4bbb5ebb8bbd35438b0a6c03939b0 100755
|
| --- a/tools/roll_angle.py
|
| +++ b/tools/roll_webgl_conformance.py
|
| @@ -15,7 +15,7 @@ import time
|
| extra_trybots = [
|
| {
|
| "mastername": "tryserver.chromium.win",
|
| - "buildername": "win_clang_dbg",
|
| + "buildernames": ["win_optional_gpu_tests_rel"]
|
| }
|
| ]
|
|
|
| @@ -34,12 +34,12 @@ upload.verbosity = 0 # Errors only.
|
| CHROMIUM_GIT_URL = 'https://chromium.googlesource.com/chromium/src.git'
|
| CL_ISSUE_RE = re.compile('^Issue number: ([0-9]+) \((.*)\)$')
|
| RIETVELD_URL_RE = re.compile('^https?://(.*)/(.*)')
|
| -ROLL_BRANCH_NAME = 'special_angle_roll_branch'
|
| +ROLL_BRANCH_NAME = 'special_webgl_roll_branch'
|
| TRYJOB_STATUS_SLEEP_SECONDS = 30
|
|
|
| # Use a shell for subcommands on Windows to get a PATH search.
|
| IS_WIN = sys.platform.startswith('win')
|
| -ANGLE_PATH = os.path.join('third_party', 'angle')
|
| +WEBGL_PATH = os.path.join('third_party', 'webgl', 'src')
|
|
|
| CommitInfo = collections.namedtuple('CommitInfo', ['git_commit',
|
| 'git_repo_url'])
|
| @@ -78,7 +78,7 @@ def _ParseDepsDict(deps_content):
|
| return local_scope
|
|
|
|
|
| -def _GenerateCLDescriptionCommand(angle_current, angle_new, bugs):
|
| +def _GenerateCLDescriptionCommand(webgl_current, webgl_new, bugs):
|
| def GetChangeString(current_hash, new_hash):
|
| return '%s..%s' % (current_hash[0:7], new_hash[0:7]);
|
|
|
| @@ -91,18 +91,31 @@ def _GenerateCLDescriptionCommand(angle_current, angle_new, bugs):
|
| bug_str += str(bug) + ','
|
| return bug_str.rstrip(',')
|
|
|
| - if angle_current.git_commit != angle_new.git_commit:
|
| - change_str = GetChangeString(angle_current.git_commit,
|
| - angle_new.git_commit)
|
| - changelog_url = GetChangeLogURL(angle_current.git_repo_url,
|
| + if webgl_current.git_commit != webgl_new.git_commit:
|
| + change_str = GetChangeString(webgl_current.git_commit,
|
| + webgl_new.git_commit)
|
| + changelog_url = GetChangeLogURL(webgl_current.git_repo_url,
|
| change_str)
|
|
|
| + def GetExtraTrybotString():
|
| + s = ''
|
| + for t in extra_trybots:
|
| + if s:
|
| + s += ';'
|
| + s += t['mastername'] + ':' + ','.join(t['buildernames'])
|
| + return s
|
| +
|
| + extra_trybot_args = []
|
| + if extra_trybots:
|
| + extra_trybot_string = GetExtraTrybotString()
|
| + extra_trybot_args = ['-m', 'CQ_INCLUDE_TRYBOTS=' + extra_trybot_string]
|
| +
|
| return [
|
| - '-m', 'Roll ANGLE ' + change_str,
|
| + '-m', 'Roll WebGL ' + change_str,
|
| '-m', '%s' % changelog_url,
|
| '-m', GetBugString(bugs),
|
| '-m', 'TEST=bots',
|
| - ]
|
| + ] + extra_trybot_args
|
|
|
|
|
| class AutoRoller(object):
|
| @@ -180,11 +193,13 @@ class AutoRoller(object):
|
| logging.debug('Dirty/unversioned files:\n%s', '\n'.join(lines))
|
| return False
|
|
|
| - def _GetBugList(self, path_below_src, angle_current, angle_new):
|
| + def _GetBugList(self, path_below_src, webgl_current, webgl_new):
|
| + # TODO(kbr): this isn't useful, at least not yet, when run against
|
| + # the WebGL Github repository.
|
| working_dir = os.path.join(self._chromium_src, path_below_src)
|
| lines = self._RunCommand(
|
| ['git','log',
|
| - '%s..%s' % (angle_current.git_commit, angle_new.git_commit)],
|
| + '%s..%s' % (webgl_current.git_commit, webgl_new.git_commit)],
|
| working_dir=working_dir).split('\n')
|
| bugs = set()
|
| for line in lines:
|
| @@ -236,24 +251,24 @@ class AutoRoller(object):
|
| # Parse current hashes.
|
| deps_filename = os.path.join(self._chromium_src, 'DEPS')
|
| deps = _ParseDepsFile(deps_filename)
|
| - angle_current = self._GetDepsCommitInfo(deps, ANGLE_PATH)
|
| + webgl_current = self._GetDepsCommitInfo(deps, WEBGL_PATH)
|
|
|
| # Find ToT revisions.
|
| - angle_latest = self._GetCommitInfo(ANGLE_PATH)
|
| + webgl_latest = self._GetCommitInfo(WEBGL_PATH)
|
|
|
| if IS_WIN:
|
| # Make sure the roll script doesn't use windows line endings
|
| self._RunCommand(['git', 'config', 'core.autocrlf', 'true'])
|
|
|
| - self._UpdateDep(deps_filename, ANGLE_PATH, angle_latest)
|
| + self._UpdateDep(deps_filename, WEBGL_PATH, webgl_latest)
|
|
|
| if self._IsTreeClean():
|
| logging.debug('Tree is clean - no changes detected.')
|
| self._DeleteRollBranch()
|
| else:
|
| - bugs = self._GetBugList(ANGLE_PATH, angle_current, angle_latest)
|
| + bugs = self._GetBugList(WEBGL_PATH, webgl_current, webgl_latest)
|
| description = _GenerateCLDescriptionCommand(
|
| - angle_current, angle_latest, bugs)
|
| + webgl_current, webgl_latest, bugs)
|
| logging.debug('Committing changes locally.')
|
| self._RunCommand(['git', 'add', '--update', '.'])
|
| self._RunCommand(['git', 'commit'] + description)
|
| @@ -261,17 +276,20 @@ class AutoRoller(object):
|
| self._RunCommand(['git', 'cl', 'upload'],
|
| extra_env={'EDITOR': 'true'})
|
|
|
| - # Run the default trybots
|
| + # Kick off tryjobs.
|
| base_try_cmd = ['git', 'cl', 'try']
|
| self._RunCommand(base_try_cmd)
|
|
|
| if extra_trybots:
|
| - # Run additional tryjobs
|
| - extra_try_args = []
|
| - for extra_trybot in extra_trybots:
|
| - extra_try_args += ['-m', extra_trybot["mastername"],
|
| - '-b', extra_trybot["buildername"]]
|
| - self._RunCommand(base_try_cmd + extra_try_args)
|
| + # Run additional tryjobs.
|
| + # TODO(kbr): this should not be necessary -- the
|
| + # CQ_INCLUDE_TRYBOTS directive above should handle it.
|
| + # http://crbug.com/585237
|
| + for trybot in extra_trybots:
|
| + for builder in trybot['buildernames']:
|
| + self._RunCommand(base_try_cmd + [
|
| + '-m', trybot['mastername'],
|
| + '-b', builder])
|
|
|
| cl_info = self._GetCLInfo()
|
| print 'Issue: %d URL: %s' % (cl_info.issue, cl_info.url)
|
| @@ -334,7 +352,7 @@ class AutoRoller(object):
|
|
|
| def main():
|
| parser = argparse.ArgumentParser(
|
| - description='Auto-generates a CL containing an ANGLE roll.')
|
| + description='Auto-generates a CL containing a WebGL conformance roll.')
|
| parser.add_argument('--abort',
|
| help=('Aborts a previously prepared roll. '
|
| 'Closes any associated issues and deletes the roll branches'),
|
|
|