Skip to content

Commit 600541d

Browse files
committed
ugh project.test() needs to work with mock Env in builder's unittests, so check for cross-compile this way instead
1 parent cccf1fd commit 600541d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

builder/core/project.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,8 @@ def build_consumers(self, env):
553553
for c in consumers:
554554
build_consumers += _build_project(c, env)
555555
# build consumer tests
556-
build_consumers += to_list(c.test(env))
556+
if c.needs_tests(env):
557+
build_consumers += to_list(c.test(env))
557558
if len(build_consumers) == 0:
558559
return None
559560
return Script(build_consumers, name='build consumers of {}'.format(self.name))
@@ -572,7 +573,7 @@ def post_build(self, env):
572573
return Script(steps, name='post_build {}'.format(self.name))
573574

574575
def test(self, env):
575-
run_tests = self.needs_tests(env)
576+
run_tests = env.config.get('run_tests', True)
576577
if not run_tests:
577578
return
578579

0 commit comments

Comments
 (0)