aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwilmoz <wcubasalas@gmail.com>2015-09-01 11:24:31 -0500
committerwilmoz <wcubasalas@gmail.com>2015-09-02 12:29:56 -0500
commitadbc6d045bc3d33e05793b00ec911dac21bcaa00 (patch)
tree18cbf695917d4b16ac1e7ff51ca8b364be46d794
parentaee011a524c096d7535bb95a1e76a1586784aeb8 (diff)
downloadservo-adbc6d045bc3d33e05793b00ec911dac21bcaa00.tar.gz
servo-adbc6d045bc3d33e05793b00ec911dac21bcaa00.zip
Add a mach command to upgrade wptrunner
-rw-r--r--python/servo/devenv_commands.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py
index 65251323bbb..7c43f7b3b38 100644
--- a/python/servo/devenv_commands.py
+++ b/python/servo/devenv_commands.py
@@ -132,3 +132,20 @@ class MachCommands(CommandBase):
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