@@ -122,6 +122,7 @@ class SingleTestRunner(object):
122
122
TEST_RESULT_IOERR_SERIAL = "IOERR_SERIAL"
123
123
TEST_RESULT_TIMEOUT = "TIMEOUT"
124
124
TEST_RESULT_NO_IMAGE = "NO_IMAGE"
125
+ TEST_RESULT_MBED_ASSERT = "MBED_ASSERT"
125
126
126
127
GLOBAL_LOOPS_COUNT = 1 # How many times each test should be repeated
127
128
TEST_LOOPS_LIST = [] # We redefine no.of loops per test_id
@@ -139,7 +140,8 @@ class SingleTestRunner(object):
139
140
"ioerr_serial" : TEST_RESULT_IOERR_SERIAL ,
140
141
"timeout" : TEST_RESULT_TIMEOUT ,
141
142
"no_image" : TEST_RESULT_NO_IMAGE ,
142
- "end" : TEST_RESULT_UNDEF
143
+ "end" : TEST_RESULT_UNDEF ,
144
+ "mbed_assert" : TEST_RESULT_MBED_ASSERT
143
145
}
144
146
145
147
def __init__ (self ,
@@ -565,7 +567,8 @@ def generate_test_summary(self, test_summary, shuffle_seed=None):
565
567
self .TEST_RESULT_IOERR_DISK : 0 ,
566
568
self .TEST_RESULT_IOERR_SERIAL : 0 ,
567
569
self .TEST_RESULT_NO_IMAGE : 0 ,
568
- self .TEST_RESULT_TIMEOUT : 0
570
+ self .TEST_RESULT_TIMEOUT : 0 ,
571
+ self .TEST_RESULT_MBED_ASSERT : 0
569
572
}
570
573
571
574
for test in test_summary :
@@ -878,6 +881,11 @@ def get_auto_property_value(property_name, line):
878
881
update_once_flag ['timeout' ] = True
879
882
duration = int (auto_timeout_val )
880
883
884
+ # Detect mbed assert:
885
+ if 'mbed assertation failed: ' in line :
886
+ output .append ('{{mbed_assert}}' )
887
+ break
888
+
881
889
# Check for test end
882
890
if '{end}' in line :
883
891
break
0 commit comments