From 927fc8d03a6e6228a4bce0c827fc95e2ec588521 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Sun, 22 Mar 2026 18:06:59 +0100 Subject: [PATCH] test(cmakev2): add test for build with IDF_COMPONENT_MANAGER=0 Verify that setting IDF_COMPONENT_MANAGER=0 skips the component manager flow entirely and produces a successful build. The test also asserts that no "Component manager round" messages appear in the output, confirming the manager loop is not entered. Signed-off-by: Frantisek Hrbata --- tools/test_build_system/buildv2/test_build.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/test_build_system/buildv2/test_build.py b/tools/test_build_system/buildv2/test_build.py index c4f295cd82..5899d02bf1 100644 --- a/tools/test_build_system/buildv2/test_build.py +++ b/tools/test_build_system/buildv2/test_build.py @@ -6,8 +6,10 @@ import subprocess from pathlib import Path import pytest +from test_build_system_helpers import EnvDict from test_build_system_helpers import IdfPyFunc from test_build_system_helpers import replace_in_file +from test_build_system_helpers import run_idf_py @pytest.mark.usefixtures('test_app_copy') @@ -377,3 +379,18 @@ def test_depgraph_generation(idf_py: IdfPyFunc) -> None: dot_content = dot_file.read_text() assert 'digraph' in dot_content, 'component_deps.dot should contain a digraph definition' assert '->' in dot_content, 'component_deps.dot should contain at least one dependency edge (->)' + + +@pytest.mark.usefixtures('test_app_copy') +def test_build_with_component_manager_disabled(default_idf_env: EnvDict) -> None: + """Setting IDF_COMPONENT_MANAGER=0 should skip the component manager + flow entirely and still produce a successful build.""" + logging.info('Testing build with IDF_COMPONENT_MANAGER=0') + + default_idf_env['IDF_COMPONENT_MANAGER'] = '0' + ret = run_idf_py('build', env=default_idf_env) + + assert 'Component manager round' not in (ret.stdout or ''), ( + 'Component manager should not run when IDF_COMPONENT_MANAGER=0' + ) + assert Path('build/build_test_app.elf').exists(), 'Build should succeed with component manager disabled'