aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-02-19 12:19:27 -0800
committerDylan Baker <dylan@pnwbakers.com>2021-02-23 09:08:55 -0800
commit44c836e0d9cf5bec0288a5b0eefc2692471f3b20 (patch)
tree33eadd5e5302eacb802804d587899ec2df01d63c /run_tests.py
parent3e11da6db5beeb42008d8d807858e054f1129206 (diff)
downloadmeson-44c836e0d9cf5bec0288a5b0eefc2692471f3b20.zip
meson-44c836e0d9cf5bec0288a5b0eefc2692471f3b20.tar.gz
meson-44c836e0d9cf5bec0288a5b0eefc2692471f3b20.tar.bz2
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.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py3
1 files changed, 2 insertions, 1 deletions
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