ci: update build system tests

pull/5628/head
Renz Bagaporo 2020-03-03 14:29:39 +08:00 zatwierdzone przez Angus Gratton
rodzic 67983d5c1c
commit fe12997a07
2 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -69,9 +69,9 @@ function run_tests()
print_status "Updating component source file rebuilds component" print_status "Updating component source file rebuilds component"
# touch a file & do a build # touch a file & do a build
take_build_snapshot take_build_snapshot
touch ${IDF_PATH}/components/esp32/cpu_start.c touch ${IDF_PATH}/components/esp_system/port/cpu_start.c
make || failure "Failed to partial build" make || failure "Failed to partial build"
assert_rebuilt ${APP_BINS} esp32/libesp32.a esp32/cpu_start.o assert_rebuilt ${APP_BINS} esp_system/libesp_system.a esp_system/port/cpu_start.o
assert_not_rebuilt lwip/liblwip.a freertos/libfreertos.a ${BOOTLOADER_BINS} partitions_singleapp.bin assert_not_rebuilt lwip/liblwip.a freertos/libfreertos.a ${BOOTLOADER_BINS} partitions_singleapp.bin
print_status "Bootloader source file rebuilds bootloader" print_status "Bootloader source file rebuilds bootloader"
@ -251,12 +251,12 @@ function run_tests()
echo "project-version-2.0(012345678901234567890123456789)" > ${TESTDIR}/template/version.txt echo "project-version-2.0(012345678901234567890123456789)" > ${TESTDIR}/template/version.txt
make make
assert_rebuilt ${APP_BINS} assert_rebuilt ${APP_BINS}
assert_not_rebuilt ${BOOTLOADER_BINS} esp32/libesp32.a assert_not_rebuilt ${BOOTLOADER_BINS} esp_system/libesp_system.a
print_status "Re-building does not change app.bin" print_status "Re-building does not change app.bin"
take_build_snapshot take_build_snapshot
make make
assert_not_rebuilt ${APP_BINS} ${BOOTLOADER_BINS} esp32/libesp32.a assert_not_rebuilt ${APP_BINS} ${BOOTLOADER_BINS} esp_system/libesp_system.a
rm -f ${TESTDIR}/template/version.txt rm -f ${TESTDIR}/template/version.txt
print_status "Get the version of app from git describe. Project is not inside IDF and do not have a tag only a hash commit." print_status "Get the version of app from git describe. Project is not inside IDF and do not have a tag only a hash commit."

Wyświetl plik

@ -72,9 +72,9 @@ function run_tests()
print_status "Updating component source file rebuilds component" print_status "Updating component source file rebuilds component"
# touch a file & do a build # touch a file & do a build
take_build_snapshot take_build_snapshot
touch ${IDF_PATH}/components/esp32/cpu_start.c touch ${IDF_PATH}/components/esp_system/port/cpu_start.c
idf.py build || failure "Failed to partial build" idf.py build || failure "Failed to partial build"
assert_rebuilt ${APP_BINS} esp-idf/esp32/libesp32.a esp-idf/esp32/CMakeFiles/${IDF_COMPONENT_PREFIX}_esp32.dir/cpu_start.c.obj assert_rebuilt ${APP_BINS} esp-idf/esp_system/libesp_system.a esp-idf/esp-idf/esp_system/CMakeFiles/${IDF_COMPONENT_PREFIX}_esp_system.dir/port/cpu_start.c.obj
assert_not_rebuilt esp-idf/lwip/liblwip.a esp-idf/freertos/libfreertos.a ${BOOTLOADER_BINS} ${PARTITION_BIN} assert_not_rebuilt esp-idf/lwip/liblwip.a esp-idf/freertos/libfreertos.a ${BOOTLOADER_BINS} ${PARTITION_BIN}
print_status "Bootloader source file rebuilds bootloader" print_status "Bootloader source file rebuilds bootloader"
@ -109,12 +109,12 @@ function run_tests()
echo "project-version-2.0(012345678901234567890123456789)" > ${TESTDIR}/template/version.txt echo "project-version-2.0(012345678901234567890123456789)" > ${TESTDIR}/template/version.txt
idf.py build || failure "Failed to rebuild with changed app version" idf.py build || failure "Failed to rebuild with changed app version"
assert_rebuilt ${APP_BINS} assert_rebuilt ${APP_BINS}
assert_not_rebuilt ${BOOTLOADER_BINS} esp-idf/esp32/libesp32.a assert_not_rebuilt ${BOOTLOADER_BINS} esp-idf/esp_system/libesp_system.a
print_status "Re-building does not change app.bin" print_status "Re-building does not change app.bin"
take_build_snapshot take_build_snapshot
idf.py build idf.py build
assert_not_rebuilt ${APP_BINS} ${BOOTLOADER_BINS} esp-idf/esp32/libesp32.a assert_not_rebuilt ${APP_BINS} ${BOOTLOADER_BINS} esp-idf/esp_system/libesp_system.a
rm -f ${IDF_PATH}/version.txt rm -f ${IDF_PATH}/version.txt
rm -f ${TESTDIR}/template/version.txt rm -f ${TESTDIR}/template/version.txt