diff --git a/HISTORY.rst b/HISTORY.rst index 3a423748..c68e7f6f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -24,9 +24,13 @@ PlatformIO Core 6 - Replaced ``monitor_flags`` with independent project configuration options: `monitor_parity `__, `monitor_eol `__, `monitor_raw `__, `monitor_echo `__ - Fixed an issue when the monitor filters were not applied in their order (`issue #4320 `_) +* **Unit Testing** + + - Merged the |UNITTESTING| "building" stage with "uploading" for the embedded target (`issue #4307 `_) + - Do not resolve dependencies from the project "src" folder when the `test_build_src `__ option is not enabled + - Fixed an issue when a custom `pio test --project-config `__ was not handled properly (`issue #4299 `_) + * Improved a serial port finder for a board with predefined HWIDs -* Merged the |UNITTESTING| "building" stage with "uploading" for the embedded target (`issue #4307 `_) -* Fixed an issue when a custom `pio test --project-config `__ was not handled properly (`issue #4299 `_) 6.0.2 (2022-06-01) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 104e8496..f868ed2d 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -889,10 +889,13 @@ class ProjectAsLibBuilder(LibBuilderBase): return include_dirs def get_search_files(self): + items = [] + build_type = self.env.GetBuildType() # project files - items = super().get_search_files() + if "test" not in build_type or self.env.GetProjectOption("test_build_src"): + items.extend(super().get_search_files()) # test files - if "test" in self.env.GetBuildType(): + if "test" in build_type: items.extend( [ os.path.join("$PROJECT_TEST_DIR", item)