From 44c836e0d9cf5bec0288a5b0eefc2692471f3b20 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 19 Feb 2021 12:19:27 -0800 Subject: add a script to run a single test As a Meson developer it's often frustrating to have a single functional test with a regression. These tests can be awkward to reproduce, especially when they make use of a test.json file. This script provides a simmple interface to call functional tests 1 at a time, regardless of whether they use a test.json or not. If they do use a test.json, and have a matrix, then the `--subtest` option can be used to select spcific combinations, for example: ```sh ./run_single_test.py "test cases/frameworks/15 llvm" --subtest 1 ``` will run only the second (zero indexed of course) subtest from the llvm test cases. This is not a super elegent script, but this is super useful. --- run_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'run_tests.py') diff --git a/run_tests.py b/run_tests.py index 5a0a70c..1e01aa9 100755 --- a/run_tests.py +++ b/run_tests.py @@ -118,7 +118,8 @@ class FakeCompilerOptions: def __init__(self): self.value = [] -def get_fake_options(prefix=''): +# TODO: use a typing.Protocol here +def get_fake_options(prefix: str = '') -> argparse.Namespace: opts = argparse.Namespace() opts.native_file = [] opts.cross_file = None -- cgit v1.1