diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-10-02 13:44:48 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-10-02 13:50:25 -0700 |
commit | 00aba4a2794c79685d698a446d8c932b0b1e0843 (patch) | |
tree | 7bb693d18319424620301a75776ac0a78219e20b | |
parent | 0fb1d029b6d64e1373448950eadc60545022fe97 (diff) | |
download | meson-00aba4a2794c79685d698a446d8c932b0b1e0843.zip meson-00aba4a2794c79685d698a446d8c932b0b1e0843.tar.gz meson-00aba4a2794c79685d698a446d8c932b0b1e0843.tar.bz2 |
interpreter: Combine test and benchmark args
Adding the test specific args later. This will help prevent bugs where
arguments are added to test but not to benchmark even when they apply.
-rw-r--r-- | mesonbuild/interpreter.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index ffd3ace..ec7a7b2 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1948,13 +1948,15 @@ known_build_target_kwargs = ( {'target_type'} ) +_base_test_args = {'args', 'depends', 'env', 'should_fail', 'timeout', 'workdir', 'suite', 'priority', 'protocol'} + permitted_kwargs = {'add_global_arguments': {'language', 'native'}, 'add_global_link_arguments': {'language', 'native'}, 'add_languages': {'required'}, 'add_project_link_arguments': {'language', 'native'}, 'add_project_arguments': {'language', 'native'}, 'add_test_setup': {'exe_wrapper', 'gdb', 'timeout_multiplier', 'env', 'is_default'}, - 'benchmark': {'args', 'depends', 'env', 'should_fail', 'timeout', 'workdir', 'suite', 'priority', 'protocol'}, + 'benchmark': _base_test_args, 'build_target': known_build_target_kwargs, 'configure_file': {'input', 'output', @@ -2032,8 +2034,7 @@ permitted_kwargs = {'add_global_arguments': {'language', 'native'}, 'library': known_library_kwargs, 'subdir': {'if_found'}, 'subproject': {'version', 'default_options', 'required'}, - 'test': {'args', 'depends', 'env', 'is_parallel', 'should_fail', 'timeout', 'workdir', - 'suite', 'protocol', 'priority'}, + 'test': set.union(_base_test_args, {'is_parallel'}), 'vcs_tag': {'input', 'output', 'fallback', 'command', 'replace_string'}, } |