Skip to content

Commit

Permalink
tests: on_target: no cloud check on fota
Browse files Browse the repository at this point in the history
Remove cloud check on fota test.

Signed-off-by: Giacomo Dematteis <[email protected]>
  • Loading branch information
DematteisGiacomo committed Oct 3, 2024
1 parent 49ccd5a commit df991fb
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions tests/on_target/tests/test_fota.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,6 @@ def _run_fota(bundleId, fota_type, fotatimeout=APP_FOTA_TIMEOUT, test_fota_resum
t91x_board.uart.wait_for_str("FMFU finished")
t91x_board.uart.wait_for_str("Connected to Cloud", "Failed to connect to Cloud after FOTA")

# Check the job status on cloud
number_of_attempts = 30
sleep_time = 30
for i in range(number_of_attempts):
logger.debug(f"Checking FOTA job status in cloud, attempt {i+1}")
time.sleep(sleep_time)
jobs = t91x_board.fota.list_fota_jobs()
job = next((job for job in jobs if job['id'] == job_id), None)
if job:
status = job['status']
if status == 'SUCCEEDED':
logger.info("FOTA job succeeded reported to cloud")
break
else:
logger.warning(f"FOTA job status in cloud is {status}, retrying in {sleep_time} seconds")
continue
else:
pytest.fail("FOTA job not found in the list of jobs")
else:
pytest.fail(f"FOTA job status not SUCCEEDED after {number_of_attempts * sleep_time} seconds")

return _run_fota


Expand Down

0 comments on commit df991fb

Please sign in to comment.