@@ -136,24 +136,29 @@ def stop(self):
136
136
class SingleTestRunner (object ):
137
137
""" Object wrapper for single test run which may involve multiple MUTs."""
138
138
139
- re_detect_testcase_result = None
139
+ RE_DETECT_TESTCASE_RESULT = None
140
140
TEST_RESULT_OK = "OK"
141
141
TEST_RESULT_FAIL = "FAIL"
142
142
TEST_RESULT_ERROR = "ERROR"
143
143
TEST_RESULT_UNDEF = "UNDEF"
144
144
TEST_RESULT_IOERR_COPY = "IOERR_COPY"
145
145
TEST_RESULT_IOERR_DISK = "IOERR_DISK"
146
+ TEST_RESULT_IOERR_SERIAL = "IOERR_SERIAL"
146
147
TEST_RESULT_TIMEOUT = "TIMEOUT"
147
148
148
149
# mbed test suite -> SingleTestRunner
149
150
TEST_RESULT_MAPPING = {"success" : TEST_RESULT_OK ,
150
151
"failure" : TEST_RESULT_FAIL ,
151
- "error" : TEST_RESULT_ERROR ,
152
- "end" : TEST_RESULT_UNDEF }
152
+ "error" : TEST_RESULT_ERROR ,
153
+ "ioerr_copy" : TEST_RESULT_IOERR_COPY ,
154
+ "ioerr_disk" : TEST_RESULT_IOERR_DISK ,
155
+ "ioerr_serial" : TEST_RESULT_IOERR_SERIAL ,
156
+ "timeout" : TEST_RESULT_TIMEOUT ,
157
+ "end" : TEST_RESULT_UNDEF }
153
158
154
159
def __init__ (self ):
155
160
pattern = "\\ {(" + "|" .join (self .TEST_RESULT_MAPPING .keys ()) + ")\\ }"
156
- self .re_detect_testcase_result = re .compile (pattern )
161
+ self .RE_DETECT_TESTCASE_RESULT = re .compile (pattern )
157
162
158
163
def file_copy_method_selector (self , image_path , disk , copy_method ):
159
164
""" Copy file depending on method you want to use """
@@ -313,7 +318,7 @@ def run_host_test(self, name, disk, port, duration, verbose=False, extra_serial=
313
318
# Parse test 'output' data
314
319
result = self .TEST_RESULT_UNDEF
315
320
for line in "" .join (output ).splitlines ():
316
- search_result = self .re_detect_testcase_result .search (line )
321
+ search_result = self .RE_DETECT_TESTCASE_RESULT .search (line )
317
322
if search_result and len (search_result .groups ()):
318
323
result = self .TEST_RESULT_MAPPING [search_result .groups (0 )[0 ]]
319
324
break
0 commit comments