aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-10-02 13:35:15 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-10-02 13:43:08 -0700
commit0fb1d029b6d64e1373448950eadc60545022fe97 (patch)
tree698b7a8fbfd6949d2e27030eb0de7436fe0ef480 /mesonbuild/interpreter.py
parent8d3fcb3dc4d7204a4646807f8b5191d79fb291e5 (diff)
downloadmeson-0fb1d029b6d64e1373448950eadc60545022fe97.zip
meson-0fb1d029b6d64e1373448950eadc60545022fe97.tar.gz
meson-0fb1d029b6d64e1373448950eadc60545022fe97.tar.bz2
interpreter: Correctly handle arguments to benchmark
This fixes two separate issues, one is that benchmark warns about depends and priority; The other is that we passed bad values like is_parallel into the test and would actually run benchmarks in parallel, which is bad.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 0aa4b37..ffd3ace 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1954,7 +1954,7 @@ permitted_kwargs = {'add_global_arguments': {'language', 'native'},
'add_project_link_arguments': {'language', 'native'},
'add_project_arguments': {'language', 'native'},
'add_test_setup': {'exe_wrapper', 'gdb', 'timeout_multiplier', 'env', 'is_default'},
- 'benchmark': {'args', 'env', 'should_fail', 'timeout', 'workdir', 'suite'},
+ 'benchmark': {'args', 'depends', 'env', 'should_fail', 'timeout', 'workdir', 'suite', 'priority', 'protocol'},
'build_target': known_build_target_kwargs,
'configure_file': {'input',
'output',
@@ -3364,8 +3364,13 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
self.generators.append(gen)
return gen
+ @FeatureNewKwargs('benchmark', '0.46.0', ['depends'])
+ @FeatureNewKwargs('benchmark', '0.52.0', ['priority'])
@permittedKwargs(permitted_kwargs['benchmark'])
def func_benchmark(self, node, args, kwargs):
+ # is_parallel isn't valid here, so make sure it isn't passed
+ if 'is_parallel' in kwargs:
+ del kwargs['is_parallel']
self.add_test(node, args, kwargs, False)
@FeatureNewKwargs('test', '0.46.0', ['depends'])