File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -215,10 +215,15 @@ def test_full_mfw_fota(run_fota_fixture):
215215 '''
216216 Test full modem FOTA on nrf9151
217217 '''
218- run_fota_fixture (
219- bundle_id = FULL_MFW_BUNDLEID ,
220- fota_type = "full" ,
221- new_version = MFW_202_VERSION ,
222- fotatimeout = FULL_MFW_FOTA_TIMEOUT ,
223- reschedule = True
224- )
218+
219+ try :
220+ run_fota_fixture (
221+ bundle_id = FULL_MFW_BUNDLEID ,
222+ fota_type = "full" ,
223+ new_version = MFW_202_VERSION ,
224+ fotatimeout = FULL_MFW_FOTA_TIMEOUT ,
225+ reschedule = True
226+ )
227+ finally :
228+ # Restore mfw202, no matter if test pass/fails
229+ flash_device (os .path .abspath (MFW_202_FILEPATH ))
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ def thingy91x_ppk2():
135135 ppk2_dev .toggle_DUT_power ("ON" ) # enable DUT power
136136
137137 time .sleep (10 )
138- for i in range (10 ):
138+ for _ in range (10 ):
139139 try :
140140 all_uarts = get_uarts ()
141141 logger .warning (f"momo all uarts { all_uarts } " )
@@ -175,6 +175,10 @@ def test_power(thingy91x_ppk2, hex_file):
175175 except AssertionError :
176176 pytest .skip ("Device unable to connect to cloud, skip ppk test" )
177177
178+ # Disable UART on the device
179+ thingy91x_ppk2 .t91x_uart .write ("pm suspend uartuart@9000\r \n " )
180+ thingy91x_ppk2 .t91x_uart .write ("pm suspend uartuart@8000\r \n " )
181+
178182 thingy91x_ppk2 .ppk2_dev .start_measuring ()
179183
180184 start = time .time ()
@@ -214,7 +218,7 @@ def test_power(thingy91x_ppk2, hex_file):
214218 last_log_time = current_time
215219
216220 # Check if PSM target has been reached
217- if rolling_average < MAX_CURRENT_PSM_UA and rolling_average > 0 :
221+ if 0 < rolling_average < MAX_CURRENT_PSM_UA :
218222 psm_reached = True
219223
220224 except Exception as e :
You can’t perform that action at this time.
0 commit comments