ci: fix `v vet` filtering

pull/6117/head
Delyan Angelov 2020-08-12 20:33:51 +03:00
parent 9478ff472f
commit 1a96bcf405
2 changed files with 8 additions and 3 deletions

View File

@ -29,8 +29,12 @@ fn main() {
is_verbose: '-verbose' in args || '-v' in args
}
for path in paths {
println(path)
if path.ends_with('_test.v') || path.contains('/tests/') {
if !os.exists(path) {
eprintln('File/folder $path does not exist')
continue
}
if path.ends_with('_test.v') || (path.contains('/tests/') && !path.contains('vlib/v/vet/')) {
eprintln('skipping $path')
continue
}
if path.ends_with('.v') {

View File

@ -8,7 +8,8 @@ fn test_vet() {
os.chdir(vroot)
test_dir := 'vlib/v/vet/tests'
tests := get_tests_in_dir(test_dir)
assert check_path(vexe, test_dir, tests) == 0
fails := check_path(vexe, test_dir, tests)
assert fails == 0
}
fn get_tests_in_dir(dir string) []string {