From: Carl Hetherington Date: Tue, 16 Jun 2020 07:53:45 +0000 (+0200) Subject: Optionally pass options into test(). X-Git-Url: https://main.carlh.net/gitweb/?p=cdist.git;a=commitdiff_plain;h=87a8a52015f564455798ba38c03888b8d9b00d9d Optionally pass options into test(). --- 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