CI: update report.py to print summary in stdout
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14713 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
ed2fbf58fd
commit
63818ef1aa
|
@ -36,8 +36,7 @@ linters := $(shell find $(ROOT)/tools/style -type f -name "*.sh")
|
|||
# Build makefile based projects
|
||||
all : makefiles
|
||||
makefiles : $(makefiles)
|
||||
$(WORKFLOWS)/report.py -t $(TEST_RESULTS) | \
|
||||
tee $(TEST_RESULTS)/test_results
|
||||
$(WORKFLOWS)/report.py -t $(TEST_RESULTS) -r $(TEST_RESULTS)/test_results
|
||||
|
||||
$(single_makefiles) : $(external)
|
||||
@mkdir -p $(TEST_RESULTS)/$(subst $(ROOT)/,,$(@D))
|
||||
|
|
|
@ -43,6 +43,10 @@ def report(args, fd):
|
|||
fd.write(stderr.text)
|
||||
fd.write('\n')
|
||||
|
||||
def write(fds, string):
|
||||
for fd in fds:
|
||||
fd.write(string)
|
||||
|
||||
thick_line = '=' * 70 + '\n'
|
||||
thin_line = '-' * 70 + '\n'
|
||||
|
||||
|
@ -86,8 +90,12 @@ def report(args, fd):
|
|||
for testcase in failures:
|
||||
write_failed_status(fd, testcase)
|
||||
|
||||
fd.write(thin_line)
|
||||
fd.write('Ran {total:d} tests in {time:.3f}s\n\n'.format(
|
||||
fds = [fd]
|
||||
if fd != sys.stdout:
|
||||
fds.append(sys.stdout)
|
||||
|
||||
write(fds, thin_line)
|
||||
write(fds, 'Ran {total:d} tests in {time:.3f}s\n\n'.format(
|
||||
total=total_count,
|
||||
time=time,
|
||||
))
|
||||
|
@ -102,14 +110,14 @@ def report(args, fd):
|
|||
)
|
||||
|
||||
if failures_count > 0:
|
||||
fd.write('FAILED ({})\n'.format(context))
|
||||
write(fds, 'FAILED ({})\n'.format(context))
|
||||
sys.exit(1)
|
||||
|
||||
if context:
|
||||
fd.write('OK ({})\n'.format(context))
|
||||
write(fds, 'OK ({})\n'.format(context))
|
||||
sys.exit(0)
|
||||
|
||||
fd.write('OK\n')
|
||||
write(fds, 'OK\n')
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in New Issue