mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
clean up vtest.v a bit
This commit is contained in:
parent
6d8548d7a5
commit
f63e24e51d
@ -55,7 +55,7 @@ pub fn test_v() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if os.dir_exists(targ) {
|
if os.dir_exists(targ) {
|
||||||
|
// Fetch all tests from the directory
|
||||||
ts.files << os.walk_ext( targ.trim_right(os.path_separator), '_test.v')
|
ts.files << os.walk_ext( targ.trim_right(os.path_separator), '_test.v')
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -117,10 +117,6 @@ pub fn (ts mut TestSession) test() {
|
|||||||
ts.benchmark.stop()
|
ts.benchmark.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn stable_example(example string, index int, arr []string) bool {
|
|
||||||
return !example.contains('vweb')
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn v_test_v(args_before_test string){
|
pub fn v_test_v(args_before_test string){
|
||||||
vexe := os.executable()
|
vexe := os.executable()
|
||||||
parent_dir := os.dir(vexe)
|
parent_dir := os.dir(vexe)
|
||||||
@ -144,22 +140,22 @@ pub fn v_test_v(args_before_test string){
|
|||||||
}
|
}
|
||||||
println('v.c can be compiled without warnings. This is good :)')
|
println('v.c can be compiled without warnings. This is good :)')
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////
|
//
|
||||||
println('Testing...')
|
println('Testing...')
|
||||||
mut ts := new_test_sesion( args_before_test )
|
mut ts := new_test_sesion( args_before_test )
|
||||||
ts.files << os.walk_ext(parent_dir, '_test.v')
|
ts.files << os.walk_ext(parent_dir, '_test.v')
|
||||||
ts.test()
|
ts.test()
|
||||||
println( ts.benchmark.total_message('running V tests') )
|
println( ts.benchmark.total_message('running V tests') )
|
||||||
//////////////////////////////////////////////////////////////
|
//
|
||||||
println('\nBuilding examples...')
|
println('\nBuilding examples...')
|
||||||
mut es := new_test_sesion( args_before_test )
|
mut es := new_test_sesion( args_before_test )
|
||||||
es.files << os.walk_ext(parent_dir+'/examples','.v').filter2(stable_example)
|
files := os.walk_ext(parent_dir+'/examples','.v')
|
||||||
|
stable := files.filter(!it.contains('vweb'))
|
||||||
|
es.files << stable
|
||||||
es.test()
|
es.test()
|
||||||
println( es.benchmark.total_message('building examples') )
|
println( es.benchmark.total_message('building examples') )
|
||||||
//////////////////////////////////////////////////////////////
|
//
|
||||||
|
|
||||||
test_vget()
|
test_vget()
|
||||||
|
|
||||||
if ts.failed || es.failed {
|
if ts.failed || es.failed {
|
||||||
exit(1)
|
exit(1)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user