diff --git a/tools/test_build_system/kconfig_test_app/CMakeLists.txt b/tools/test_build_system/kconfig_test_app/CMakeLists.txt new file mode 100644 index 00000000000..0c1c3af87e5 --- /dev/null +++ b/tools/test_build_system/kconfig_test_app/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.22) + +# placeholder_before_include_project_cmake + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +# placeholder_after_include_project_cmake + +project(kconfig_test_app) diff --git a/tools/test_build_system/kconfig_test_app/README.md b/tools/test_build_system/kconfig_test_app/README.md new file mode 100644 index 00000000000..bf647248934 --- /dev/null +++ b/tools/test_build_system/kconfig_test_app/README.md @@ -0,0 +1,3 @@ +Information about this test app can be found [here](../README.md#application-under-test). + +This is a 1:1 copy of build_test_app, but with a malformed KConfig.projbuild file. diff --git a/tools/test_build_system/kconfig_test_app/main/CMakeLists.txt b/tools/test_build_system/kconfig_test_app/main/CMakeLists.txt new file mode 100644 index 00000000000..084d3788c8e --- /dev/null +++ b/tools/test_build_system/kconfig_test_app/main/CMakeLists.txt @@ -0,0 +1,5 @@ +# placeholder_before_idf_component_register + +idf_component_register(SRCS "kconfig_test_app.c" + # placeholder_inside_idf_component_register +) diff --git a/tools/test_build_system/build_test_app/main/KConfig.projbuild b/tools/test_build_system/kconfig_test_app/main/KConfig.projbuild similarity index 100% rename from tools/test_build_system/build_test_app/main/KConfig.projbuild rename to tools/test_build_system/kconfig_test_app/main/KConfig.projbuild diff --git a/tools/test_build_system/kconfig_test_app/main/kconfig_test_app.c b/tools/test_build_system/kconfig_test_app/main/kconfig_test_app.c new file mode 100644 index 00000000000..89169f848a4 --- /dev/null +++ b/tools/test_build_system/kconfig_test_app/main/kconfig_test_app.c @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include +// placeholder_before_main + +void app_main(void) +{ + // placeholder_inside_main +} diff --git a/tools/test_build_system/test_build.py b/tools/test_build_system/test_build.py index ef6f0d1c798..ad63258e7ed 100644 --- a/tools/test_build_system/test_build.py +++ b/tools/test_build_system/test_build.py @@ -258,6 +258,7 @@ def test_build_cmake_executable_suffix(idf_py: IdfPyFunc, test_app_copy: Path) - assert 'Project build complete' in ret.stdout, 'Build with CMAKE_EXECUTABLE_SUFFIX set failed' +@pytest.mark.test_app_copy('tools/test_build_system/kconfig_test_app') def test_build_with_misspelled_kconfig(idf_py: IdfPyFunc, test_app_copy: Path) -> None: logging.info('idf.py can build with misspelled Kconfig file') ret = idf_py('build')