diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-08-25 01:28:24 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-08-25 13:34:53 +0200 |
commit | 26a311fc6212b420e5976e408d317737398fa13e (patch) | |
tree | e6aed7fef25098b9bc530e091528105d26deea8d /tests/wpt/webgl/tools/import-conformance-tests.py | |
parent | 4852f7d6160a1a3af3bf834d16e7ff1c29dfc0cc (diff) | |
download | servo-26a311fc6212b420e5976e408d317737398fa13e.tar.gz servo-26a311fc6212b420e5976e408d317737398fa13e.zip |
Use sdk/tests when syncing from upstream Khronos WebGL tests
Diffstat (limited to 'tests/wpt/webgl/tools/import-conformance-tests.py')
-rwxr-xr-x | tests/wpt/webgl/tools/import-conformance-tests.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/tests/wpt/webgl/tools/import-conformance-tests.py b/tests/wpt/webgl/tools/import-conformance-tests.py index 55e183f9a5b..56d9ac2f61a 100755 --- a/tests/wpt/webgl/tools/import-conformance-tests.py +++ b/tests/wpt/webgl/tools/import-conformance-tests.py @@ -10,25 +10,19 @@ import argparse KHRONOS_REPO_URL = "https://github.com/KhronosGroup/WebGL.git" # Patches for conformance tests 1.0.x -PATCHES_1X = [ - ("js-test-pre.patch", "resources/js-test-pre.js"), +PATCHES = [ + ("js-test-pre.patch", "js/js-test-pre.js"), ("unit.patch", "conformance/more/unit.js"), ("unit2.patch", "conformance/more/unit.js"), ("timeout.patch", None) ] -# Patches for conformance tests 2.0.x -PATCHES_2X = [ - ("js-test-pre2.patch", "js/js-test-pre.js"), - ("unit.patch", "conformance/more/unit.js"), - ("unit2.patch", "conformance/more/unit.js") -] # Fix for 'UnicodeDecodeError: 'ascii' codec can't decode byte' reload(sys) sys.setdefaultencoding('utf8') def usage(): - print("Usage: {} version destination [existing_webgl_repo]".format(sys.argv[0])) + print("Usage: {} destination [existing_webgl_repo]".format(sys.argv[0])) sys.exit(1) def get_tests(base_dir, file_name, tests_list): @@ -76,8 +70,8 @@ def process_test(test): -def update_conformance(version, destination, existing_repo, patches_dir): - print("Trying to import WebGL conformance test suite {} into {}".format(version, destination)) +def update_conformance(destination, existing_repo, patches_dir): + print("Trying to import WebGL tests into {}".format(destination)) if existing_repo: directory = existing_repo @@ -87,7 +81,7 @@ def update_conformance(version, destination, existing_repo, patches_dir): print("Cloning WebGL repository into temporary directory {}".format(directory)) subprocess.check_call(["git", "clone", KHRONOS_REPO_URL, directory, "--depth", "1"]) - suite_dir = os.path.join(directory, "conformance-suites", version) + suite_dir = os.path.join(directory, "sdk/tests") print("Test suite directory: {}".format(suite_dir)) if not os.path.isdir(suite_dir): @@ -133,8 +127,7 @@ def update_conformance(version, destination, existing_repo, patches_dir): # Try to apply the patches to the required files if not patches_dir: patches_dir = os.path.abspath(os.path.dirname(sys.argv[0])) - patches = PATCHES_2X if version.startswith('2') else PATCHES_1X - for patch, file_name in patches: + for patch, file_name in PATCHES: try: patch = os.path.join(patches_dir, patch) if file_name is None: @@ -147,12 +140,11 @@ def update_conformance(version, destination, existing_repo, patches_dir): def main(): parser = argparse.ArgumentParser() - parser.add_argument("version", help="WebGL test suite version (e.g.: 1.0.3)") parser.add_argument("destination", help="Test suite destination") parser.add_argument("-e", "--existing-repo", help="Path to an existing clone of the khronos WebGL repository") args = parser.parse_args() - update_conformance(args.version, args.destination, args.existing_repo, None) + update_conformance(args.destination, args.existing_repo, None) if __name__ == '__main__': main() |