@@ -106,31 +106,32 @@ def main(log_level, no_log_timestamps, image, file_image_list, qemu, verbose):
106
106
107
107
# Parse output of the unit test. Generally expect things like:
108
108
# I (3034) CHIP-tests: Starting CHIP tests!
109
+ # INF [==========] Running all tests.
110
+ # INF [ RUN ] TestASN1.NullWriter
111
+ # INF [ OK ] TestASN1.NullWriter
109
112
# ...
110
- # Various test lines, none ending with "] : FAILED"
111
- # ...
112
- # Failed Tests: 0 / 5
113
- # Failed Asserts: 0 / 77
114
- # I (3034) CHIP-tests: CHIP test status: 0
113
+ # INF [ RUN ] TestASN1.ASN1UniversalTime
114
+ # ERR src/lib/asn1/tests/TestASN1.cpp:366: Failure
115
+ # ERR Expected: 1 == 5
116
+ # ERR Actual: 1 == 5
117
+ # ERR [ FAILED ] TestASN1.ASN1UniversalTime
118
+ # INF [==========] Done running all tests.
119
+ # INF [ PASSED ] 5 test(s).
120
+ # ERR [ FAILED ] 1 test(s).
121
+ # I (3034) CHIP-tests: CHIP test status: 1
115
122
in_test = False
116
123
for line in output .split ('\n ' ):
117
- if line . endswith ( 'CHIP-tests: Starting CHIP tests!' ) :
124
+ if 'CHIP-tests: Starting CHIP tests!' in line :
118
125
in_test = True
119
126
120
- if line .startswith ('Failed Tests:' ) and not line .startswith ('Failed Tests: 0 /' ):
121
- raise Exception ("Tests seem failed: %s" % line )
122
-
123
- if line .startswith ('Failed Asserts:' ) and not line .startswith ('Failed Asserts: 0 /' ):
124
- raise Exception ("Asserts seem failed: %s" % line )
125
-
126
127
if 'CHIP-tests: CHIP test status: 0' in line :
127
128
in_test = False
128
129
elif 'CHIP-tests: CHIP test status: ' in line :
129
130
raise Exception ("CHIP test status is NOT 0: %s" % line )
130
131
131
132
# Ignore FAILED messages not in the middle of a test, to reduce
132
- # the chance of false posisitves from other logging.
133
- if in_test and re .match ( '.*] : FAILED$ ' , line ):
133
+ # the chance of false positives from other logging.
134
+ if in_test and re .search ( r' \[ FAILED \] ' , line ):
134
135
raise Exception ("Step failed: %s" % line )
135
136
136
137
# TODO: Figure out why exit(0) in man_app.cpp's tester_task is aborting and fix that.
0 commit comments