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

comptime: fix #ifdef/#endif generation

This commit is contained in:
Delyan Angelov
2020-04-11 12:41:48 +03:00
parent 93d2ab200f
commit b10fcc79ba
3 changed files with 36 additions and 22 deletions

View File

@ -9,7 +9,6 @@ const (
'vlib/arrays/arrays_test.v',
'vlib/cli/command_test.v',
'vlib/cli/flag_test.v',
'vlib/clipboard/clipboard_test.v', // Linux only
'vlib/crypto/aes/aes_test.v',
'vlib/crypto/rand/rand_test.v',
'vlib/crypto/rc4/rc4_test.v',
@ -22,16 +21,12 @@ const (
'vlib/net/http/http_httpbin_test.v',
'vlib/net/http/http_test.v',
'vlib/regex/regex_test.v',
'vlib/sqlite/sqlite_test.v', // Linux only
'vlib/strconv/ftoa/f32_f64_to_string_test.v',
'vlib/v/tests/array_to_string_test.v',
'vlib/v/tests/asm_test.v', // Linux only
'vlib/v/tests/backtrace_test.v', // TCC only
'vlib/v/tests/enum_bitfield_test.v',
'vlib/v/tests/fixed_array_test.v',
'vlib/v/tests/fn_test.v',
'vlib/v/tests/fn_variadic_test.v',
'vlib/v/tests/live_test.v', // Linux only
'vlib/v/tests/match_test.v',
'vlib/v/tests/msvc_test.v',
'vlib/v/tests/mut_test.v',
@ -47,6 +42,12 @@ const (
'vlib/v/tests/valgrind/valgrind_test.v', // ubuntu-musl only
'vlib/v/tests/pointers_str_test.v',
]
skip_on_non_linux = [
'vlib/clipboard/clipboard_test.v', // Linux only
'vlib/sqlite/sqlite_test.v', // Linux only
'vlib/v/tests/asm_test.v', // Linux only
'vlib/v/tests/live_test.v', // Linux only
]
)
fn main() {
@ -57,12 +58,14 @@ fn main() {
args_string := args[1..].join(' ')
cmd_prefix := args_string.all_before('test-fixed')
title := 'testing all fixed tests'
all_test_files := os.walk_ext( os.join_path(vroot,'vlib'), '_test.v')
testing.eheader(title)
mut tsession := testing.new_test_session(cmd_prefix)
tsession.files << all_test_files
tsession.skip_files << skip_test_files
$if !linux {
tsession.skip_files << skip_on_non_linux
}
tsession.test()
eprintln(tsession.benchmark.total_message(title))
if tsession.benchmark.nfail > 0 {