mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
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["toolchain"].extend([os.path.realpath(inc) for inc in glob(g)])
|
||||||
|
|
||||||
includes["unity"] = []
|
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:
|
if unity_dir:
|
||||||
includes["unity"].append(unity_dir)
|
includes["unity"].append(unity_dir)
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ def test_check_includes_passed(clirunner, check_dir):
|
|||||||
inc_count = l.count("-I")
|
inc_count = l.count("-I")
|
||||||
|
|
||||||
# at least 1 include path for default mode
|
# 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):
|
def test_check_silent_mode(clirunner, validate_cliresult, check_dir):
|
||||||
|
Reference in New Issue
Block a user