mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
valgrind: run the tests
This commit is contained in:
parent
85e411bd7c
commit
a02395fe2d
@ -8,6 +8,8 @@ fn test_all() {
|
||||
}
|
||||
exe := os.executable()
|
||||
dir := os.dir(exe)
|
||||
vexe := os.dir(os.dir(os.dir(os.dir(dir)))) + '/v'
|
||||
println(vexe)
|
||||
println(dir)
|
||||
println(111)
|
||||
// files := os.ls('$dir/vlib/v/tests/valgrind/') or {
|
||||
@ -15,5 +17,25 @@ fn test_all() {
|
||||
panic(err)
|
||||
}
|
||||
tests := files.filter(it.ends_with('.vv'))
|
||||
for test in tests {
|
||||
os.system('cp $dir/$test x.v') // cant run .vv file
|
||||
println(test)
|
||||
res := os.exec('$vexe x.v') or {
|
||||
println('valgrind $test failed')
|
||||
assert false
|
||||
continue
|
||||
}
|
||||
println(res.output)
|
||||
os.exec('valgrind ./x') or {
|
||||
println('valgrind $test failed')
|
||||
assert false
|
||||
continue
|
||||
}
|
||||
println(res.output)
|
||||
if res.exit_code != 0 {
|
||||
println('valgrind $test failed')
|
||||
assert false
|
||||
}
|
||||
}
|
||||
println(tests)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user