v2 / vlib / builtin / linux_bare / old / .checks / checks.v
32 lines · 25 sloc · 514 bytes · 2332ecff4811b8c97dfda8e825170e9397962519
Raw
1module main
2
3import os
4
5fn failed (msg string) {
6 println ("!!! failed: ${msg}")
7}
8
9fn passed (msg string) {
10 println (">>> passed: ${msg}")
11}
12
13
14fn vcheck(vfile string) {
15 run_check := "v -user_mod_path . -freestanding run "
16 if 0 == os.system("${run_check} ${vfile}/${vfile}.v") {
17 passed(run_check)
18 } else {
19 failed(run_check)
20 }
21 os.system("ls -lh ${vfile}/${vfile}")
22 os.system("rm -f ${vfile}/${vfile}")
23}
24
25fn main() {
26 vcheck("linuxsys")
27 vcheck("string")
28 vcheck("consts")
29 vcheck("structs")
30 exit(0)
31}
32
33