Skip to content

Commit

Permalink
tests: on_target: small fixes
Browse files Browse the repository at this point in the history
Small fixes on dfu and fota tests.

Signed-off-by: Giacomo Dematteis <[email protected]>
  • Loading branch information
DematteisGiacomo committed Oct 25, 2024
1 parent 0ed736a commit 8396170
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 0 additions & 1 deletion scripts/pmr_nrf53.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@
+-------------------------------------------+
| 0x21000000: sram_primary (0x10000 - 64kB) |
+-------------------------------------------+

11 changes: 7 additions & 4 deletions tests/on_target/tests/test_fota.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,20 @@ def _run_fota(bundleId, fota_type, fotatimeout=APP_FOTA_TIMEOUT, test_fota_resum
@pytest.mark.dut1
@pytest.mark.fota
def test_app_fota(t91x_board, hex_file, run_fota_fixture):
# Get latest app fota bundle
# Get latest APP fota bundle
results = t91x_board.fota.get_fota_bundles()
if not results:
pytest.fail("Failed to get APP FOTA bundles")
available_bundles = results["bundles"]
logger.debug(f"Number of available bundles: {len(available_bundles)}")
latest_bundle = available_bundles[0]
app_bundles = [bundle for bundle in available_bundles if "APP" in bundle["bundleId"]]
if not app_bundles:
pytest.fail("No APP FOTA bundles found")
latest_app_bundle = app_bundles[0]

logger.debug(f"Latest bundle: {latest_bundle}")
logger.debug(f"Latest APP bundle: {latest_app_bundle}")

run_fota_fixture(bundleId=latest_bundle["bundleId"], fota_type="app", test_fota_resumption=True)
run_fota_fixture(bundleId=latest_app_bundle["bundleId"], fota_type="app", test_fota_resumption=True)


@pytest.mark.dut1
Expand Down
8 changes: 4 additions & 4 deletions tests/on_target/tests/test_serial_dfu.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def test_dfu(t91x_dfu):

t91x_dfu.uart.start()

# Look for correct mcuboot firmware version
expected_lines = ["Firmware version 3", "Zephyr OS"]
# Look for correct firmware version
expected_lines = ["Attempting to boot slot 1", "Firmware version 3", "*** Booting Hello, nRF Cloud"]
for _ in range(3):
try:
# reset nrf91
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_dfu(t91x_dfu):
raise Exception("Failed to perform nRF53 BL DFU after 3 attempts.")

results = dfu_device(NRF53_BL_UPDATE_ZIP, serial=CONNECTIVITY_BRIDGE_UART, check_53_version=True)
# assert mcuboot slot 1 has correct version number 2
assert "S1: 2" in results
# assert mcuboot slot 1 has correct version number 3
assert "S1: 3" in results

logger.info("nRF53 DFU successful")

0 comments on commit 8396170

Please sign in to comment.