mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Auto merge of #7494 - wilmoz:upgradeWptRunner, r=jdm
Add a mach command to upgrade wptrunner https://github.com/servo/servo/issues/7491 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7494) <!-- Reviewable:end -->
This commit is contained in:
commit
c442132196
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