v test: print all fails
parent
011afeb2ea
commit
24fdefe152
|
@ -909,7 +909,7 @@ fn test_v() {
|
||||||
mut joined_args := env_vflags_and_os_args().right(1).join(' ')
|
mut joined_args := env_vflags_and_os_args().right(1).join(' ')
|
||||||
joined_args = joined_args.left(joined_args.last_index('test'))
|
joined_args = joined_args.left(joined_args.last_index('test'))
|
||||||
println('$joined_args')
|
println('$joined_args')
|
||||||
|
mut failed := false
|
||||||
test_files := os.walk_ext('.', '_test.v')
|
test_files := os.walk_ext('.', '_test.v')
|
||||||
for dot_relative_file in test_files {
|
for dot_relative_file in test_files {
|
||||||
relative_file := dot_relative_file.replace('./', '')
|
relative_file := dot_relative_file.replace('./', '')
|
||||||
|
@ -917,12 +917,13 @@ fn test_v() {
|
||||||
tmpcfilepath := file.replace('_test.v', '_test.tmp.c')
|
tmpcfilepath := file.replace('_test.v', '_test.tmp.c')
|
||||||
print(relative_file + ' ')
|
print(relative_file + ' ')
|
||||||
r := os.exec('$vexe $joined_args -debug $file') or {
|
r := os.exec('$vexe $joined_args -debug $file') or {
|
||||||
cerror('failed on $file')
|
failed = true
|
||||||
return
|
println('FAIL')
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
if r.exit_code != 0 {
|
if r.exit_code != 0 {
|
||||||
println('failed `$file` (\n$r.output\n)')
|
println('FAIL `$file` (\n$r.output\n)')
|
||||||
exit(1)
|
failed = true
|
||||||
} else {
|
} else {
|
||||||
println('OK')
|
println('OK')
|
||||||
}
|
}
|
||||||
|
@ -935,17 +936,21 @@ fn test_v() {
|
||||||
tmpcfilepath := file.replace('.v', '.tmp.c')
|
tmpcfilepath := file.replace('.v', '.tmp.c')
|
||||||
print(relative_file + ' ')
|
print(relative_file + ' ')
|
||||||
r := os.exec('$vexe $joined_args -debug $file') or {
|
r := os.exec('$vexe $joined_args -debug $file') or {
|
||||||
cerror('failed on $file')
|
failed = true
|
||||||
return
|
println('FAIL')
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
if r.exit_code != 0 {
|
if r.exit_code != 0 {
|
||||||
println('failed `$file` (\n$r.output\n)')
|
println('FAIL `$file` (\n$r.output\n)')
|
||||||
exit(1)
|
failed = true
|
||||||
} else {
|
} else {
|
||||||
println('OK')
|
println('OK')
|
||||||
}
|
}
|
||||||
os.rm(tmpcfilepath)
|
os.rm(tmpcfilepath)
|
||||||
}
|
}
|
||||||
|
if failed {
|
||||||
|
exit(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_symlink() {
|
fn create_symlink() {
|
||||||
|
|
Loading…
Reference in New Issue