diff --git a/vlib/v/tests/valgrind/valgrind_test.v b/vlib/v/tests/valgrind/valgrind_test.v index 10e2c4a5dc..116842920b 100644 --- a/vlib/v/tests/valgrind/valgrind_test.v +++ b/vlib/v/tests/valgrind/valgrind_test.v @@ -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) }