forked from platformio/platformio-core
Export Unit Testing flags only to the project build environment
This commit is contained in:
@ -26,7 +26,8 @@ PlatformIO Core 6
|
||||
|
||||
* **Unit Testing**
|
||||
|
||||
- Merged the |UNITTESTING| "building" stage with "uploading" for the embedded target (`issue #4307 <https://github.com/platformio/platformio-core/issues/4307>`_)
|
||||
- Export |UNITTESTING| flags only to the project build environment (``projenv``, files in "src" folder)
|
||||
- Merged the "building" stage with "uploading" for the embedded target (`issue #4307 <https://github.com/platformio/platformio-core/issues/4307>`_)
|
||||
- Do not resolve dependencies from the project "src" folder when the `test_build_src <https://docs.platformio.org/en/latest//projectconf/section_env_test.html#test-build-src>`__ option is not enabled
|
||||
- Fixed an issue when a custom `pio test --project-config <https://docs.platformio.org/en/latest/core/userguide/cmd_test.html#cmdoption-pio-test-c>`__ was not handled properly (`issue #4299 <https://github.com/platformio/platformio-core/issues/4299>`_)
|
||||
|
||||
|
@ -867,6 +867,8 @@ class ProjectAsLibBuilder(LibBuilderBase):
|
||||
project_src_filter = env.get("SRC_FILTER")
|
||||
super().__init__(env, *args, **kwargs)
|
||||
self.env["SRC_FILTER"] = project_src_filter
|
||||
if "test" in self.env.GetBuildType():
|
||||
self.env.ConfigureTestTarget()
|
||||
|
||||
@classmethod
|
||||
def get_instance(cls, *args, **kwargs):
|
||||
|
@ -126,8 +126,6 @@ def ProcessProgramDeps(env):
|
||||
|
||||
if "debug" in env.GetBuildType():
|
||||
env.ConfigureDebugTarget()
|
||||
if "test" in env.GetBuildType():
|
||||
env.ConfigureTestTarget()
|
||||
|
||||
# remove specified flags
|
||||
env.ProcessUnFlags(env.get("BUILD_UNFLAGS"))
|
||||
|
Reference in New Issue
Block a user