ci: fail compiler_errors_test.v, when at least one of all the parser/checker tests failed

pull/6121/head
Delyan Angelov 2020-08-13 12:57:16 +03:00
parent 1a96bcf405
commit fd5a76a8ad
1 changed files with 3 additions and 2 deletions

View File

@ -41,8 +41,6 @@ fn test_all() {
tasks << new_tasks(vexe, run_dir, 'run', '.run.out', run_tests)
tasks << new_tasks(vexe, parser_dir, '-prod', '.out', parser_tests)
tasks.run()
total_errors := tasks.filter(it.is_error).len
assert total_errors == 0
}
fn new_tasks(vexe, dir, voptions, result_extension string, tests []string) []TaskDescription {
@ -76,11 +74,13 @@ fn (mut tasks []TaskDescription) run() {
for _ in 0 .. vjobs {
go work_processor(mut work, mut results)
}
mut total_errors := 0
for _ in 0 .. tasks.len {
mut task := TaskDescription{}
results.pop(&task)
bench.step()
if task.is_error {
total_errors++
bench.fail()
eprintln(bench.step_message_with_label_and_duration(benchmark.b_fail, task.path,
task.took))
@ -101,6 +101,7 @@ fn (mut tasks []TaskDescription) run() {
bench.stop()
eprintln(term.h_divider('-'))
eprintln(bench.total_message('all tests'))
assert total_errors == 0
}
// a single worker thread spends its time getting work from the `work` channel,