mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #929 from PrzemekWirkus/mbed_assert_3
Test suite - mbed assert detectionpull/938/head
commit
8895e91be3
|
@ -259,6 +259,7 @@ class HostTestResults:
|
|||
self.RESULT_IOERR_COPY = "ioerr_copy"
|
||||
self.RESULT_PASSIVE = "passive"
|
||||
self.RESULT_NOT_DETECTED = "not_detected"
|
||||
self.RESULT_MBED_ASSERT = "mbed_assert"
|
||||
|
||||
|
||||
import workspace_tools.host_tests as host_tests
|
||||
|
|
|
@ -122,6 +122,7 @@ class SingleTestRunner(object):
|
|||
TEST_RESULT_IOERR_SERIAL = "IOERR_SERIAL"
|
||||
TEST_RESULT_TIMEOUT = "TIMEOUT"
|
||||
TEST_RESULT_NO_IMAGE = "NO_IMAGE"
|
||||
TEST_RESULT_MBED_ASSERT = "MBED_ASSERT"
|
||||
|
||||
GLOBAL_LOOPS_COUNT = 1 # How many times each test should be repeated
|
||||
TEST_LOOPS_LIST = [] # We redefine no.of loops per test_id
|
||||
|
@ -139,7 +140,8 @@ class SingleTestRunner(object):
|
|||
"ioerr_serial" : TEST_RESULT_IOERR_SERIAL,
|
||||
"timeout" : TEST_RESULT_TIMEOUT,
|
||||
"no_image" : TEST_RESULT_NO_IMAGE,
|
||||
"end" : TEST_RESULT_UNDEF
|
||||
"end" : TEST_RESULT_UNDEF,
|
||||
"mbed_assert" : TEST_RESULT_MBED_ASSERT
|
||||
}
|
||||
|
||||
def __init__(self,
|
||||
|
@ -565,7 +567,8 @@ class SingleTestRunner(object):
|
|||
self.TEST_RESULT_IOERR_DISK : 0,
|
||||
self.TEST_RESULT_IOERR_SERIAL : 0,
|
||||
self.TEST_RESULT_NO_IMAGE : 0,
|
||||
self.TEST_RESULT_TIMEOUT : 0
|
||||
self.TEST_RESULT_TIMEOUT : 0,
|
||||
self.TEST_RESULT_MBED_ASSERT : 0
|
||||
}
|
||||
|
||||
for test in test_summary:
|
||||
|
@ -878,6 +881,11 @@ class SingleTestRunner(object):
|
|||
update_once_flag['timeout'] = True
|
||||
duration = int(auto_timeout_val)
|
||||
|
||||
# Detect mbed assert:
|
||||
if 'mbed assertation failed: ' in line:
|
||||
output.append('{{mbed_assert}}')
|
||||
break
|
||||
|
||||
# Check for test end
|
||||
if '{end}' in line:
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue