mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
![bogen85](/assets/img/avatar_default.png)
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)
34 lines
590 B
V
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)
|
|
}
|
|
|