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:
@ -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
|
||||
|
Reference in New Issue
Block a user