ci: add test for component override features

pull/5628/head
Renz Bagaporo 2020-04-02 22:33:48 +08:00
rodzic bd55cdff02
commit 9950c7f21d
1 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -743,6 +743,19 @@ endmenu\n" >> ${IDF_PATH}/Kconfig
rm -rf build
popd
print_status "Getting component overriden dir"
clean_build_dir
mkdir -p components/esp32
echo "idf_component_get_property(overriden_dir \${COMPONENT_NAME} COMPONENT_OVERRIDEN_DIR)" >> components/esp32/CMakeLists.txt
echo "message(STATUS overriden_dir:\${overriden_dir})" >> components/esp32/CMakeLists.txt
(idf.py reconfigure | grep "overriden_dir:$IDF_PATH/components/esp32") || failure "Failed to get overriden dir" # no registration, overrides registration as well
print_status "Overriding Kconfig"
echo "idf_component_register(KCONFIG \${overriden_dir}/Kconfig)" >> components/esp32/CMakeLists.txt
echo "idf_component_get_property(kconfig \${COMPONENT_NAME} KCONFIG)" >> components/esp32/CMakeLists.txt
echo "message(STATUS kconfig:\${overriden_dir}/Kconfig)" >> components/esp32/CMakeLists.txt
(idf.py reconfigure | grep "kconfig:$IDF_PATH/components/esp32/Kconfig") || failure "Failed to verify original `main` directory"
rm -rf components
print_status "All tests completed"
if [ -n "${FAILURES}" ]; then
echo "Some failures were detected:"