mirror of
https://github.com/vlang/v.git
synced 2025-09-08 23:07:19 -04:00
tools: add SKIP_TESTS env variable support for parser_speed.v and scanner_speed.v
This commit is contained in:
parent
68d962f6b3
commit
56644b2b52
@ -6,6 +6,8 @@ import v.parser
|
||||
import v.errors
|
||||
import v.scanner
|
||||
|
||||
const skip_tests = os.getenv_opt('SKIP_TESTS') or { '' }.bool()
|
||||
|
||||
fn main() {
|
||||
files := os.args#[1..]
|
||||
if files.len > 0 && files[0].starts_with('@') {
|
||||
@ -31,7 +33,7 @@ fn process_files(files []string) ! {
|
||||
if f == '' {
|
||||
continue
|
||||
}
|
||||
if f.ends_with('_test.v') {
|
||||
if skip_tests && f.ends_with('_test.v') {
|
||||
continue
|
||||
}
|
||||
// do not measure the scanning, but only the parsing:
|
||||
|
@ -3,6 +3,8 @@ import time
|
||||
import v.scanner
|
||||
import v.pref
|
||||
|
||||
const skip_tests = os.getenv_opt('SKIP_TESTS') or { '' }.bool()
|
||||
|
||||
fn main() {
|
||||
files := os.args#[1..]
|
||||
if files.len > 0 && files[0].starts_with('@') {
|
||||
@ -27,7 +29,7 @@ fn process_files(files []string) ! {
|
||||
if f == '' {
|
||||
continue
|
||||
}
|
||||
if f.ends_with('_test.v') {
|
||||
if skip_tests && f.ends_with('_test.v') {
|
||||
continue
|
||||
}
|
||||
sw.restart()
|
||||
|
Loading…
x
Reference in New Issue
Block a user