From 5ffce1d18487cb1d032fed99626dc27ec4552654 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 12 Oct 2020 00:27:08 +0200 Subject: [PATCH] Do the test build before calling test(), not within. --- cdist | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cdist b/cdist index 9b89d77..2a88d94 100755 --- a/cdist +++ b/cdist @@ -448,10 +448,6 @@ class Target(object): """test is the test case to run, or None""" tree = globals.trees.get(project, checkout, target) - if self.build_dependencies: - tree.build_dependencies(options) - tree.build(options) - tree.add_defaults(options) with TreeDirectory(tree): if len(inspect.getfullargspec(tree.cscript['test']).args) == 3: @@ -1288,7 +1284,9 @@ def main(): target = None try: target = target_factory(args) - target.test(args.project, args.checkout, target, args.test, get_command_line_options(args)) + options = get_command_line_options(args) + target.build(args.project, args.checkout, options) + target.test(args.project, args.checkout, target, args.test, options) finally: if target is not None and not args.keep: target.cleanup() -- 2.30.2