forked from platformio/platformio-core
Automatically install tool-unity when there are tests and "idedata" target is called
This commit is contained in:
@ -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)
|
||||
|
||||
|
@ -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):
|
||||
|
Reference in New Issue
Block a user