Automatically install tool-unity when there are tests and "idedata" target is called

This commit is contained in:
Ivan Kravets
2021-01-20 15:14:45 +02:00
parent 11a71b7fbb
commit 985f31877c
2 changed files with 5 additions and 2 deletions

View File

@ -59,7 +59,10 @@ def _dump_includes(env):
includes["toolchain"].extend([os.path.realpath(inc) for inc in glob(g)])
includes["unity"] = []
unity_dir = get_core_package_dir("tool-unity", auto_install=False)
unity_dir = get_core_package_dir(
"tool-unity",
auto_install=os.path.isdir(env.GetProjectConfig().get_optional_dir("test")),
)
if unity_dir:
includes["unity"].append(unity_dir)

View File

@ -154,7 +154,7 @@ def test_check_includes_passed(clirunner, check_dir):
inc_count = l.count("-I")
# at least 1 include path for default mode
assert inc_count > 1
assert inc_count > 0
def test_check_silent_mode(clirunner, validate_cliresult, check_dir):