From 9518cded3b829416962bc0b7f8efdaf5ce4f8daa Mon Sep 17 00:00:00 2001 From: Giacomo Dematteis Date: Tue, 3 Dec 2024 08:54:33 +0100 Subject: [PATCH] tests: on_target: re-add fota resumption Fota resumption test was commented out. Re-introduce it. Signed-off-by: Giacomo Dematteis --- tests/on_target/tests/test_functional/test_fota.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/on_target/tests/test_functional/test_fota.py b/tests/on_target/tests/test_functional/test_fota.py index c7552e15..96c2dd98 100644 --- a/tests/on_target/tests/test_functional/test_fota.py +++ b/tests/on_target/tests/test_functional/test_fota.py @@ -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") @@ -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)