File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
mbed_platform/system_reset Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,6 @@ class SystemResetTest(BaseHostTest):
36
36
def __init__ (self ):
37
37
super (SystemResetTest , self ).__init__ ()
38
38
self .reset = False
39
- cycle_s = self .get_config_item ('program_cycle_s' )
40
- self .program_cycle_s = cycle_s if cycle_s is not None else DEFAULT_CYCLE_PERIOD
41
-
42
39
self .test_steps_sequence = self .test_steps ()
43
40
# Advance the coroutine to it's first yield statement.
44
41
self .test_steps_sequence .send (None )
@@ -61,16 +58,18 @@ def test_steps(self):
61
58
"""Reset the device and check the status
62
59
"""
63
60
system_reset = yield
64
-
65
61
self .reset = False
62
+
63
+ wait_after_reset = self .get_config_item ('forced_reset_timeout' )
64
+ wait_after_reset = wait_after_reset if wait_after_reset is not None else DEFAULT_CYCLE_PERIOD
65
+
66
66
self .send_kv (MSG_KEY_DEVICE_RESET , MSG_VALUE_DUMMY )
67
- time .sleep (self . program_cycle_s )
67
+ time .sleep (wait_after_reset )
68
68
self .send_kv (MSG_KEY_SYNC , MSG_VALUE_DUMMY )
69
69
70
70
system_reset = yield
71
-
72
71
if self .reset == False :
73
72
raise RuntimeError ('Platform did not reset as expected.' )
74
73
75
74
# The sequence is correct -- test passed.
76
- yield True
75
+ yield True
Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ void test_system_reset()
43
43
44
44
int main (void )
45
45
{
46
- GREENTEA_SETUP (2 , " system_reset" );
46
+ GREENTEA_SETUP (30 , " system_reset" );
47
47
test_system_reset ();
48
48
GREENTEA_TESTSUITE_RESULT (0 ); // Fail on any error.
49
49
50
50
return 0 ;
51
- }
51
+ }
You can’t perform that action at this time.
0 commit comments