Skip to content

Commit

Permalink
tests: on_target: re-add fota resumption
Browse files Browse the repository at this point in the history
Fota resumption test was commented out.
Re-introduce it.

Signed-off-by: Giacomo Dematteis <[email protected]>
  • Loading branch information
DematteisGiacomo committed Dec 3, 2024
1 parent eb61063 commit 9518cde
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/on_target/tests/test_functional/test_fota.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@

def post_job(t91x_fota, bundle_id, fota_type):
result = t91x_fota.fota.post_fota_job(type=fota_type, bundle_id=bundle_id)
job_id = result["id"]
if not result:
pytest.skip("Failed to post FOTA job")
t91x_fota.uart.flush()
return job_id
return

def run_fota_resumption(t91x_fota, fota_type):
logger.debug(f"Testing fota resumption on disconnect for {fota_type} fota")
Expand Down Expand Up @@ -57,10 +56,10 @@ def _run_fota(bundleId, fota_type, fotatimeout=APP_FOTA_TIMEOUT, test_fota_resum
reset_device()
t91x_fota.uart.wait_for_str("Connected to Cloud")

job_id = post_job(t91x_fota, bundleId, fota_type)
post_job(t91x_fota, bundleId, fota_type)

# if test_fota_resumption:
# run_fota_resumption(t91x_fota, fota_type)
if test_fota_resumption:
run_fota_resumption(t91x_fota, fota_type)

t91x_fota.uart.flush()
t91x_fota.uart.wait_for_str("FOTA download finished", timeout=fotatimeout)
Expand Down

0 comments on commit 9518cde

Please sign in to comment.