mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 12:44:33 +02:00
tool: Add unit test for Kconfig gen
This commit is contained in:
committed by
Renz Christian Bagaporo
parent
89afc96bf0
commit
18b5d7e5ab
@@ -265,6 +265,17 @@ function run_tests()
|
||||
make EXTRA_COMPONENT_DIRS=$PWD/mycomponents || failure "EXTRA_COMPONENT_DIRS has added a sibling directory"
|
||||
rm -rf esp32
|
||||
rm -rf mycomponents
|
||||
|
||||
print_status "sdkconfig should have contents both files: sdkconfig and sdkconfig.defaults"
|
||||
make clean > /dev/null;
|
||||
rm -f sdkconfig.defaults;
|
||||
rm -f sdkconfig;
|
||||
echo "CONFIG_PARTITION_TABLE_OFFSET=0x10000" >> sdkconfig.defaults;
|
||||
echo "CONFIG_PARTITION_TABLE_TWO_OTA=y" >> sdkconfig;
|
||||
make defconfig > /dev/null;
|
||||
grep "CONFIG_PARTITION_TABLE_OFFSET=0x10000" sdkconfig || failure "The define from sdkconfig.defaults should be into sdkconfig"
|
||||
grep "CONFIG_PARTITION_TABLE_TWO_OTA=y" sdkconfig || failure "The define from sdkconfig should be into sdkconfig"
|
||||
|
||||
print_status "All tests completed"
|
||||
if [ -n "${FAILURES}" ]; then
|
||||
echo "Some failures were detected:"
|
||||
|
@@ -238,6 +238,17 @@ EOF
|
||||
export PATH="$OLDPATH"
|
||||
rm ./python
|
||||
|
||||
print_status "sdkconfig should have contents both files: sdkconfig and sdkconfig.defaults"
|
||||
idf.py clean > /dev/null;
|
||||
idf.py fullclean > /dev/null;
|
||||
rm -f sdkconfig.defaults;
|
||||
rm -f sdkconfig;
|
||||
echo "CONFIG_PARTITION_TABLE_OFFSET=0x10000" >> sdkconfig.defaults;
|
||||
echo "CONFIG_PARTITION_TABLE_TWO_OTA=y" >> sdkconfig;
|
||||
idf.py reconfigure > /dev/null;
|
||||
grep "CONFIG_PARTITION_TABLE_OFFSET=0x10000" sdkconfig || failure "The define from sdkconfig.defaults should be into sdkconfig"
|
||||
grep "CONFIG_PARTITION_TABLE_TWO_OTA=y" sdkconfig || failure "The define from sdkconfig should be into sdkconfig"
|
||||
|
||||
print_status "All tests completed"
|
||||
if [ -n "${FAILURES}" ]; then
|
||||
echo "Some failures were detected:"
|
||||
|
Reference in New Issue
Block a user