1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tests: support -silent flag to silence OK messages in CI jobs

This commit is contained in:
Delyan Angelov
2020-01-24 21:07:44 +02:00
committed by Alexander Medvednikov
parent f55646746c
commit df2d3a268d
2 changed files with 20 additions and 16 deletions

View File

@ -20,6 +20,7 @@ pub mut:
ntask int // writing to this should be locked by mu.
ntask_mtx &sync.Mutex
waitgroup &sync.WaitGroup
show_ok_tests bool
}
pub fn new_test_session(vargs string) TestSession {
@ -30,6 +31,8 @@ pub fn new_test_session(vargs string) TestSession {
ntask: 0
ntask_mtx: sync.new_mutex()
waitgroup: sync.new_waitgroup()
show_ok_tests: !vargs.contains('-silent')
}
}
@ -167,7 +170,9 @@ fn (ts mut TestSession) process_files() {
else {
ts.benchmark.ok()
tls_bench.ok()
eprintln(tls_bench.step_message_ok(relative_file))
if ts.show_ok_tests {
eprintln(tls_bench.step_message_ok(relative_file))
}
}
}
if os.exists(generated_binary_fpath) {