Skip to content

Commit

Permalink
ci: reorder ota-delta tests for improved reliability
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieDriver committed Jan 22, 2025
1 parent 26e8fb3 commit 5c386e2
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions ota_delta_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ fi
# first we reset the device
python ${IDF_PATH}/components/esptool_py/esptool/esptool.py --chip esp32 --port ${JADESERIALPORT} --baud 2000000 --before default_reset erase_flash

# then we flash the noblob variant
python ${IDF_PATH}/components/esptool_py/esptool/esptool.py --chip esp32 --port ${JADESERIALPORT} --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xE000 build_noblobs/ota_data_initial.bin 0x1000 build_noblobs/bootloader/bootloader.bin 0x10000 build_noblobs/jade.bin 0x9000 build_noblobs/partition_table/partition-table.bin
# then we flash the ble-enabled variant
python ${IDF_PATH}/components/esptool_py/esptool/esptool.py --chip esp32 --port ${JADESERIALPORT} --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xE000 build/ota_data_initial.bin 0x1000 build/bootloader/bootloader.bin 0x10000 build/jade.bin 0x9000 build/partition_table/partition-table.bin

# Setup the python environment
source ~/venv3/bin/activate
Expand All @@ -37,25 +37,26 @@ mkdir -p ${PATCHDIR}
./tools/mkpatch.py ${FW_NORADIO} ${FW_BLE} ${PATCHDIR} # makes both directions
sleep 2

# first we test the same exact firmware noblobs via serial without the hash file being present
# first we ota to noblob via ble
# NOTE: the filename is of the pattern: 'final-from-base' - hence noradio*ble*patch.bin
FW_PATCH=$(ls ${PATCHDIR}/*_noradio_*_ble*_patch.bin)
cp "${FW_NORADIO}.hash" "${FW_PATCH}.hash"
python jade_ota.py --log=INFO --skipserial --bleidfromserial --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}

# then we test the same exact firmware via serial
FW_PATCH=$(ls ${PATCHDIR}/*_noradio_*_noradio*_patch.bin)
python jade_ota.py --log=INFO --skipble --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}
sleep 2

# now we test from noblob to ble via serial with the hash file in place
# then we test from noblob to ble via serial
# NOTE: the filename is of the pattern: 'final-from-base' - hence ble*noradio*patch.bin
FW_PATCH=$(ls ${PATCHDIR}/*_ble_*_noradio*_patch.bin)
cp "${FW_BLE}.hash" "${FW_PATCH}.hash"
python jade_ota.py --log=INFO --skipble --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}
sleep 2

# now we test the same exact firmware ble via ble without the hash file being present
# finally we test the same exact firmware via ble
FW_PATCH=$(ls ${PATCHDIR}/*_ble_*_ble*_patch.bin)
python jade_ota.py --log=INFO --skipserial --bleidfromserial --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}
sleep 2

# now we go back to noblob via ble with the hash file in place
# NOTE: the filename is of the pattern: 'final-from-base' - hence noradio*ble*patch.bin
FW_PATCH=$(ls ${PATCHDIR}/*_noradio_*_ble*_patch.bin)
cp "${FW_NORADIO}.hash" "${FW_PATCH}.hash"
python jade_ota.py --log=INFO --skipserial --bleidfromserial --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}

0 comments on commit 5c386e2

Please sign in to comment.