summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-10-12 00:27:08 +0200
committerCarl Hetherington <cth@carlh.net>2020-10-17 21:33:57 +0200
commit5ffce1d18487cb1d032fed99626dc27ec4552654 (patch)
tree4dcc8d3110563e279f7d8c78b1ff727785282815
parent8e89b4dbdc17ab0984fe4a6e702211b7c6467a97 (diff)
Do the test build before calling test(), not within.
-rwxr-xr-xcdist8
1 files 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()