mirror of
https://github.com/servo/servo.git
synced 2025-06-10 01:23:13 +00:00
Add a mach command to upgrade wptrunner
This commit is contained in:
parent
aee011a524
commit
adbc6d045b
1 changed files with 17 additions and 0 deletions
|
@ -132,3 +132,20 @@ class MachCommands(CommandBase):
|
||||||
return subprocess.call(
|
return subprocess.call(
|
||||||
["git"] + ["grep"] + params + ['--'] + grep_paths + [':(exclude)*.min.js'],
|
["git"] + ["grep"] + params + ['--'] + grep_paths + [':(exclude)*.min.js'],
|
||||||
env=self.build_env())
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue