diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index f273e4c0ff2..e6a78e36830 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -272,6 +272,7 @@ pytest_buildv2_system: --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} -- test_non_default_target.py + test_component_manager.py pytest_build_system_macos: extends: diff --git a/tools/test_build_system/buildv2_test_app/CMakeLists.txt b/tools/test_build_system/buildv2_test_app/CMakeLists.txt index 8033ecd8a48..09cde1b47c4 100644 --- a/tools/test_build_system/buildv2_test_app/CMakeLists.txt +++ b/tools/test_build_system/buildv2_test_app/CMakeLists.txt @@ -9,3 +9,16 @@ include($ENV{IDF_PATH}/tools/cmakev2/idf.cmake) project(build_test_app C CXX ASM) idf_project_default() + +# When doing idf.py add-dependency, the component manager +# expects the tools/cmake/project.cmake file to be included +# in the project-level CMakeLists.txt file. If it does not +# find it, it assumes that that the project-root directory +# is a component and crates a manifest in the project-root +# directory. Hence, as a workaround, we trick the component +# manager by including the tools/cmake/project.cmake file +# but return early. +# TODO: Remove this workaround (IDF-14072) +return() + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) diff --git a/tools/test_build_system/test_component_manager.py b/tools/test_build_system/test_component_manager.py index 5434bc6745c..18295660e00 100644 --- a/tools/test_build_system/test_component_manager.py +++ b/tools/test_build_system/test_component_manager.py @@ -4,6 +4,7 @@ import json import os.path from pathlib import Path +import pytest from test_build_system_helpers import IdfPyFunc from test_build_system_helpers import replace_in_file @@ -158,6 +159,9 @@ class TestOptionalDependencyWithKconfig: ) assert 'Missing required kconfig option after retry.' in res.stderr + @pytest.mark.buildv2_skip( + 'cmakev2 needs explicit REQUIRES for EXTRA_COMPONENT_DIRS as no special handling of the main component occurs' + ) def test_kconfig_in_transitive_dependency(self, idf_py: IdfPyFunc, test_app_copy: Path) -> None: idf_py('create-component', 'foo') (test_app_copy / 'foo' / 'idf_component.yml').write_text("""