From 1a96bcf405ebb2ec1cdcc7b72d5bf5e36193e62a Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 12 Aug 2020 20:33:51 +0300 Subject: [PATCH] ci: fix `v vet` filtering --- cmd/tools/vvet.v | 8 ++++++-- vlib/v/vet/vet_test.v | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/tools/vvet.v b/cmd/tools/vvet.v index 878ddabe4f..057c878e8c 100644 --- a/cmd/tools/vvet.v +++ b/cmd/tools/vvet.v @@ -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') { diff --git a/vlib/v/vet/vet_test.v b/vlib/v/vet/vet_test.v index 9742b18692..79a8f1c85c 100644 --- a/vlib/v/vet/vet_test.v +++ b/vlib/v/vet/vet_test.v @@ -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 {