From 87a8a52015f564455798ba38c03888b8d9b00d9d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 16 Jun 2020 09:53:45 +0200 Subject: [PATCH] Optionally pass options into test(). --- cdist | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cdist b/cdist index 01e016c..ffcce29 100755 --- a/cdist +++ b/cdist @@ -480,7 +480,13 @@ class Target(object): if self.build_dependencies: tree.build_dependencies(options) tree.build(options) - return tree.call('test', test) + + tree.add_defaults(options) + if len(inspect.getfullargspec(tree.cscript['test']).args) == 3: + return tree.call('test', options, test) + else: + log_normal('Deprecated cscript test() method with no options parameter') + return tree.call('test', test) def set(self, a, b): self.variables[a] = b -- 2.30.2