1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/builtin/bare/.checks/checks.v
bogen85 751ba48bf5 freestanding improvements (exit, function checks)
Fixed exit for freestanding (as assert now uses it).
Running each function check now in a forked process so they can be killed or return other exit codes (and so each function runs, even if others crash)
2019-12-07 22:25:19 +03:00

34 lines
590 B
V

module main
import os
fn failed (msg string) {
println ("!!! failed: $msg")
}
fn passed (msg string) {
println (">>> passed: $msg")
}
fn vcheck(vfile string) {
//os.system("ln -s ../forkedtest $vfile/forkedtest")
run_check := "v -user_mod_path . -freestanding --enable-globals run "
if 0 == os.system("$run_check $vfile/${vfile}.v") {
passed(run_check)
} else {
failed(run_check)
}
os.system("ls -lh $vfile/$vfile")
os.system("rm -f $vfile/$vfile")
//os.system("rm -f $vfile/forkedtest")
}
fn main() {
vcheck("linuxsys")
vcheck("string")
vcheck("consts")
exit(0)
}