Skip to content

Commit 9950c7f

Browse files
committed
ci: add test for component override features
1 parent bd55cdf commit 9950c7f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tools/ci/test_build_system_cmake.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,19 @@ endmenu\n" >> ${IDF_PATH}/Kconfig
743743
rm -rf build
744744
popd
745745

746+
print_status "Getting component overriden dir"
747+
clean_build_dir
748+
mkdir -p components/esp32
749+
echo "idf_component_get_property(overriden_dir \${COMPONENT_NAME} COMPONENT_OVERRIDEN_DIR)" >> components/esp32/CMakeLists.txt
750+
echo "message(STATUS overriden_dir:\${overriden_dir})" >> components/esp32/CMakeLists.txt
751+
(idf.py reconfigure | grep "overriden_dir:$IDF_PATH/components/esp32") || failure "Failed to get overriden dir" # no registration, overrides registration as well
752+
print_status "Overriding Kconfig"
753+
echo "idf_component_register(KCONFIG \${overriden_dir}/Kconfig)" >> components/esp32/CMakeLists.txt
754+
echo "idf_component_get_property(kconfig \${COMPONENT_NAME} KCONFIG)" >> components/esp32/CMakeLists.txt
755+
echo "message(STATUS kconfig:\${overriden_dir}/Kconfig)" >> components/esp32/CMakeLists.txt
756+
(idf.py reconfigure | grep "kconfig:$IDF_PATH/components/esp32/Kconfig") || failure "Failed to verify original `main` directory"
757+
rm -rf components
758+
746759
print_status "All tests completed"
747760
if [ -n "${FAILURES}" ]; then
748761
echo "Some failures were detected:"

0 commit comments

Comments
 (0)