tests: flush test headers to ensure stable output with VJOBS>1

master
Delyan Angelov 2022-06-22 12:45:24 +03:00
parent 23d1c792c0
commit 6a4ba22eae
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 3 additions and 0 deletions

View File

@ -561,6 +561,7 @@ pub fn eheader(msg string) {
pub fn header(msg string) { pub fn header(msg string) {
println(term.header_left(msg, '-')) println(term.header_left(msg, '-'))
flush_stdout()
} }
pub fn setup_new_vtmp_folder() string { pub fn setup_new_vtmp_folder() string {

View File

@ -26,6 +26,7 @@ fn main() {
spent := sw.elapsed().milliseconds() spent := sw.elapsed().milliseconds()
oks := commands.filter(it.ecode == 0) oks := commands.filter(it.ecode == 0)
fails := commands.filter(it.ecode != 0) fails := commands.filter(it.ecode != 0)
flush_stdout()
println('') println('')
println(term.header_left(term_highlight('Summary of `v test-all`:'), '-')) println(term.header_left(term_highlight('Summary of `v test-all`:'), '-'))
println(term_highlight('Total runtime: $spent ms')) println(term_highlight('Total runtime: $spent ms'))
@ -37,6 +38,7 @@ fn main() {
msg := if fcmd.errmsg != '' { fcmd.errmsg } else { fcmd.line } msg := if fcmd.errmsg != '' { fcmd.errmsg } else { fcmd.line }
println(term.failed('> Failed:') + ' $msg') println(term.failed('> Failed:') + ' $msg')
} }
flush_stdout()
if fails.len > 0 { if fails.len > 0 {
exit(1) exit(1)
} }