File tree 2 files changed +18
-9
lines changed
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):
215
215
'''
216
216
Test full modem FOTA on nrf9151
217
217
'''
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():
135
135
ppk2_dev .toggle_DUT_power ("ON" ) # enable DUT power
136
136
137
137
time .sleep (10 )
138
- for i in range (10 ):
138
+ for _ in range (10 ):
139
139
try :
140
140
all_uarts = get_uarts ()
141
141
logger .warning (f"momo all uarts { all_uarts } " )
@@ -175,6 +175,10 @@ def test_power(thingy91x_ppk2, hex_file):
175
175
except AssertionError :
176
176
pytest .skip ("Device unable to connect to cloud, skip ppk test" )
177
177
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
+
178
182
thingy91x_ppk2 .ppk2_dev .start_measuring ()
179
183
180
184
start = time .time ()
@@ -214,7 +218,7 @@ def test_power(thingy91x_ppk2, hex_file):
214
218
last_log_time = current_time
215
219
216
220
# 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 :
218
222
psm_reached = True
219
223
220
224
except Exception as e :
You can’t perform that action at this time.
0 commit comments