tests: do not panic on failed tests, just warn and exit(1).

pull/6615/head
Delyan Angelov 2020-10-14 23:42:30 +03:00
parent 9e16576380
commit 5a11b87097
2 changed files with 4 additions and 2 deletions

View File

@ -79,6 +79,7 @@ fn main() {
tsession.test() tsession.test()
eprintln(tsession.benchmark.total_message(title)) eprintln(tsession.benchmark.total_message(title))
if tsession.benchmark.nfail > 0 { if tsession.benchmark.nfail > 0 {
panic('\nWARNING: failed $tsession.benchmark.nfail times.\n') eprintln('\nWARNING: failed $tsession.benchmark.nfail times.\n')
exit(1)
} }
} }

View File

@ -49,7 +49,8 @@ fn v_test_formatting(vargs string) {
vfmt_test_session.test() vfmt_test_session.test()
eprintln(vfmt_test_session.benchmark.total_message('running vfmt over V files')) eprintln(vfmt_test_session.benchmark.total_message('running vfmt over V files'))
if vfmt_test_session.benchmark.nfail > 0 { if vfmt_test_session.benchmark.nfail > 0 {
panic('\nWARNING: v fmt failed ${vfmt_test_session.benchmark.nfail} times.\n') eprintln('\nWARNING: v fmt failed ${vfmt_test_session.benchmark.nfail} times.\n')
exit(1)
} }
} }