Skip to content

Commit

Permalink
Add a mach command to upgrade wptrunner
Browse files Browse the repository at this point in the history
  • Loading branch information
wilcus committed Sep 2, 2015
1 parent aee011a commit adbc6d0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions python/servo/devenv_commands.py
Expand Up @@ -132,3 +132,20 @@ def grep(self, params):
return subprocess.call(
["git"] + ["grep"] + params + ['--'] + grep_paths + [':(exclude)*.min.js'],
env=self.build_env())

@Command('wpt-upgrade',
description='upgrade wptrunner.',
category='devenv')
def upgrade_wpt_runner(self):
with cd(path.join(self.context.topdir, 'tests', 'wpt', 'harness')):
code = subprocess.call(["git", "init"], env=self.build_env())
if code:
return code
subprocess.call(
["git", "remote", "add", "upstream", "https://github.com/w3c/wptrunner.git"], env=self.build_env())
code = subprocess.call(["git", "fetch", "upstream"], env=self.build_env())
if code:
return code
code = subprocess.call(["git", "reset", '--', "hard", "remotes/upstream/master"], env=self.build_env())
if code:
return code

0 comments on commit adbc6d0

Please sign in to comment.