Austin Eng | 4beb5d6 | 2021-03-24 16:29:59 | [diff] [blame^] | 1 | # Copyright 2021 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | import argparse |
| 6 | import sys |
| 7 | |
| 8 | # This script is run via //third_party/blink/tools/run_webgpu_cts.py which |
| 9 | # adds blinkpy to the Python path. |
| 10 | from blinkpy.web_tests import run_web_tests |
| 11 | |
| 12 | |
| 13 | def main(args, stderr): |
| 14 | parser = argparse.ArgumentParser( |
| 15 | description= |
| 16 | 'Performs additional setup for running the WebGPU CTS, ' |
| 17 | 'then forward arguments to run_web_tests.py.' |
| 18 | ) |
| 19 | parser.add_argument('--webgpu-cts-expectations', required=True) |
| 20 | |
| 21 | options, rest_args = parser.parse_known_args(args) |
| 22 | |
| 23 | forwarded_args = rest_args + [ |
| 24 | '--ignore-default-expectations', '--additional-expectations', |
| 25 | options.webgpu_cts_expectations |
| 26 | ] |
| 27 | |
| 28 | run_web_tests.main(forwarded_args, stderr) |
| 29 | |
| 30 | |
| 31 | if __name__ == '__main__': |
| 32 | sys.exit(main(sys.argv[1:], sys.stderr)) |