You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
794 B

7 days ago
# -*- coding: utf-8 -*-
"""票 09:t06-test2.log 汇总(教训:判 BUILD 看 log 行,不看 EXIT)。"""
import io, re, sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
t = open(r'e:\code\crm-backend-matt\.scratch\opportunity-bugfix\t06-test2.log',
encoding='utf-8', errors='replace').read()
m = re.findall(r'Tests run: (\d+), Failures: (\d+), Errors: (\d+)', t)
print('suites', len(m), 'total', sum(int(a) for a, b, c in m),
'F', sum(int(b) for a, b, c in m), 'E', sum(int(c) for a, b, c in m))
print('BUILD SUCCESS' if 'BUILD SUCCESS' in t
else ('BUILD FAILURE' if 'BUILD FAILURE' in t else 'NO-BUILD-LINE'))
for line in t.splitlines():
if 'OpportunityDetailServiceImplTest' in line and 'Tests run' in line:
print(line.strip())