mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
Handle deprecated values in sdkconfig.defaults
The issue was pointed out also in https://github.com/espressif/esp-idf/issues/4092
This commit is contained in:
@@ -350,7 +350,28 @@ endmenu\n" >> ${IDF_PATH}/Kconfig;
|
||||
pushd ${IDF_PATH}
|
||||
git checkout -- sdkconfig.rename Kconfig
|
||||
popd
|
||||
make defconfig
|
||||
|
||||
print_status "Handling deprecated Kconfig options in sdkconfig.defaults"
|
||||
make clean;
|
||||
rm -f sdkconfig;
|
||||
echo "CONFIG_TEST_OLD_OPTION=7" > sdkconfig.defaults;
|
||||
echo "CONFIG_TEST_OLD_OPTION CONFIG_TEST_NEW_OPTION" > ${IDF_PATH}/sdkconfig.rename;
|
||||
echo -e "\n\
|
||||
menu \"test\"\n\
|
||||
config TEST_NEW_OPTION\n\
|
||||
int \"TEST_NEW_OPTION\"\n\
|
||||
range 0 10\n\
|
||||
default 5\n\
|
||||
help\n\
|
||||
TEST_NEW_OPTION description\n\
|
||||
endmenu\n" >> ${IDF_PATH}/Kconfig;
|
||||
make defconfig > /dev/null;
|
||||
grep "CONFIG_TEST_OLD_OPTION=7" sdkconfig || failure "CONFIG_TEST_OLD_OPTION=7 should be in sdkconfig for backward compatibility"
|
||||
grep "CONFIG_TEST_NEW_OPTION=7" sdkconfig || failure "CONFIG_TEST_NEW_OPTION=7 should be in sdkconfig"
|
||||
rm -f sdkconfig.defaults;
|
||||
pushd ${IDF_PATH}
|
||||
git checkout -- sdkconfig.rename Kconfig
|
||||
popd
|
||||
|
||||
print_status "All tests completed"
|
||||
if [ -n "${FAILURES}" ]; then
|
||||
|
Reference in New Issue
Block a user