test: fixed test_build_system test failure due to Kconfig change

This commit is contained in:
Xiao Xufeng 2023-03-03 18:42:50 +08:00
parent 017aa5acd6
commit f368737a26

View File

@ -49,14 +49,19 @@ if(NOT CONFIG_SECURE_BOOT_ALLOW_SHORT_APP_PARTITION AND
endif()
endif()
set(min_rev_str "${CONFIG_ESP_REV_MIN_FULL}")
if(min_rev_str STREQUAL "")
set(min_rev_str 0)
endif()
# We still set "--min-rev" to keep the app compatible with older booloaders where this field is controlled.
if(CONFIG_IDF_TARGET_ESP32)
# for this chip min_rev is major revision
math(EXPR min_rev "${CONFIG_ESP_REV_MIN_FULL} / 100")
math(EXPR min_rev "${min_rev_str} / 100")
endif()
if(CONFIG_IDF_TARGET_ESP32C3)
# for this chip min_rev is minor revision
math(EXPR min_rev "${CONFIG_ESP_REV_MIN_FULL} % 100")
math(EXPR min_rev "${min_rev_str} % 100")
endif()
if(min_rev)