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:
Roland Dobai
2019-09-25 15:58:02 +02:00
parent abdf12dc9e
commit dedaf624db
19 changed files with 312 additions and 147 deletions

View File

@@ -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