kopia lustrzana https://github.com/espressif/esp-idf
tool: Add unit test for Kconfig gen
rodzic
1177427aac
commit
bf925869fe
|
@ -260,6 +260,16 @@ function run_tests()
|
|||
( make 2>&1 | grep "does not fit in configured flash size 1MB" ) || failure "Build didn't fail with expected flash size failure message"
|
||||
mv sdkconfig.bak sdkconfig
|
||||
|
||||
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:"
|
||||
|
|
|
@ -291,6 +291,17 @@ function run_tests()
|
|||
rm -rf main/main
|
||||
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
||||
|
||||
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:"
|
||||
|
|
Ładowanie…
Reference in New Issue