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
|
# Build makefile based projects
|
||||||
all : makefiles
|
all : makefiles
|
||||||
makefiles : $(makefiles)
|
makefiles : $(makefiles)
|
||||||
$(WORKFLOWS)/report.py -t $(TEST_RESULTS) | \
|
$(WORKFLOWS)/report.py -t $(TEST_RESULTS) -r $(TEST_RESULTS)/test_results
|
||||||
tee $(TEST_RESULTS)/test_results
|
|
||||||
|
|
||||||
$(single_makefiles) : $(external)
|
$(single_makefiles) : $(external)
|
||||||
@mkdir -p $(TEST_RESULTS)/$(subst $(ROOT)/,,$(@D))
|
@mkdir -p $(TEST_RESULTS)/$(subst $(ROOT)/,,$(@D))
|
||||||
|
|
|
@ -43,6 +43,10 @@ def report(args, fd):
|
||||||
fd.write(stderr.text)
|
fd.write(stderr.text)
|
||||||
fd.write('\n')
|
fd.write('\n')
|
||||||
|
|
||||||
|
def write(fds, string):
|
||||||
|
for fd in fds:
|
||||||
|
fd.write(string)
|
||||||
|
|
||||||
thick_line = '=' * 70 + '\n'
|
thick_line = '=' * 70 + '\n'
|
||||||
thin_line = '-' * 70 + '\n'
|
thin_line = '-' * 70 + '\n'
|
||||||
|
|
||||||
|
@ -86,8 +90,12 @@ def report(args, fd):
|
||||||
for testcase in failures:
|
for testcase in failures:
|
||||||
write_failed_status(fd, testcase)
|
write_failed_status(fd, testcase)
|
||||||
|
|
||||||
fd.write(thin_line)
|
fds = [fd]
|
||||||
fd.write('Ran {total:d} tests in {time:.3f}s\n\n'.format(
|
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,
|
total=total_count,
|
||||||
time=time,
|
time=time,
|
||||||
))
|
))
|
||||||
|
@ -102,14 +110,14 @@ def report(args, fd):
|
||||||
)
|
)
|
||||||
|
|
||||||
if failures_count > 0:
|
if failures_count > 0:
|
||||||
fd.write('FAILED ({})\n'.format(context))
|
write(fds, 'FAILED ({})\n'.format(context))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if context:
|
if context:
|
||||||
fd.write('OK ({})\n'.format(context))
|
write(fds, 'OK ({})\n'.format(context))
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
fd.write('OK\n')
|
write(fds, 'OK\n')
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in New Issue