1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tests: support VTEST_ONLY=parser ./v vlib/v/compiler_errors_test.v

This commit is contained in:
Delyan Angelov
2020-07-09 10:26:14 +03:00
parent c0a0949932
commit ce31c4c03e
2 changed files with 24 additions and 3 deletions

View File

@ -69,6 +69,7 @@ pub fn (mut ts TestSession) test() {
//
ts.init()
mut remaining_files := []string{}
vtest_only := os.getenv('VTEST_ONLY')
for dot_relative_file in ts.files {
relative_file := dot_relative_file.replace('./', '')
file := os.real_path(relative_file)
@ -92,6 +93,11 @@ pub fn (mut ts TestSession) test() {
continue
}
}
if vtest_only.len > 0 {
if !file.contains(vtest_only) {
continue
}
}
remaining_files << dot_relative_file
}
ts.files = remaining_files