diff options
author | Imanol Fernandez <mortimergoro@gmail.com> | 2017-10-30 19:02:33 +0100 |
---|---|---|
committer | Imanol Fernandez <mortimergoro@gmail.com> | 2017-10-31 16:00:12 +0100 |
commit | b5043de011ed98a09eb9fc3102d244d8cf473d08 (patch) | |
tree | c4135ce75a3b29222c0ae35d5d6a0f816016252b /python/servo/testing_commands.py | |
parent | 052971a71a91389bef90d27d42008d5648f727b4 (diff) | |
download | servo-b5043de011ed98a09eb9fc3102d244d8cf473d08.tar.gz servo-b5043de011ed98a09eb9fc3102d244d8cf473d08.zip |
Create match command to update WebGL conformance suite from upstream
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 29d098e6cb4..9c322694f12 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -20,6 +20,7 @@ from time import time import json import urllib2 import base64 +import shutil from mach.registrar import Registrar from mach.decorators import ( @@ -929,3 +930,24 @@ testing/web-platform/mozilla/tests for Servo-only tests""" % reference_path) run_globals = {"__file__": run_file} execfile(run_file, run_globals) return run_globals["update_test_file"](cache_dir) + + @Command('update-webgl', + description='Update the WebGL conformance suite tests from Khronos repo', + category='testing') + @CommandArgument('--version', action='store_true', default='1.0.3', + help='WebGL conformance suite version') + def update_webgl(self, version=None): + self.ensure_bootstrapped() + + base_dir = path.abspath(path.join(PROJECT_TOPLEVEL_PATH, + "tests", "wpt", "mozilla", "tests", "webgl")) + run_file = path.join(base_dir, "tools", "import-conformance-tests.py") + dest_folder = path.join(base_dir, "conformance-%s" % version) + patches_dir = path.join(base_dir, "tools") + # Clean dest folder if exists + if os.path.exists(dest_folder): + shutil.rmtree(dest_folder) + + run_globals = {"__file__": run_file} + execfile(run_file, run_globals) + return run_globals["update_conformance"](version, dest_folder, None, patches_dir) |