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

tools: make v test vlib and v test-self skip _test.js.v files, when node is not installed

This commit is contained in:
Delyan Angelov
2021-12-07 21:31:29 +02:00
parent c29a3cf6e8
commit 7bbc70820a
3 changed files with 45 additions and 5 deletions

View File

@@ -147,12 +147,22 @@ fn main() {
cmd_prefix := args_string.all_before('test-self')
title := 'testing vlib'
mut all_test_files := os.walk_ext(os.join_path(vroot, 'vlib'), '_test.v')
all_test_files << os.walk_ext(os.join_path(vroot, 'vlib'), '_test.js.v')
test_js_files := os.walk_ext(os.join_path(vroot, 'vlib'), '_test.js.v')
all_test_files << test_js_files
testing.eheader(title)
mut tsession := testing.new_test_session(cmd_prefix, true)
tsession.files << all_test_files.filter(!it.contains('testdata' + os.path_separator))
tsession.skip_files << skip_test_files
if !testing.is_node_present {
testroot := vroot + os.path_separator
tsession.skip_files << test_js_files.map(it.replace(testroot, ''))
}
testing.find_started_process('mysqld') or {
tsession.skip_files << 'vlib/mysql/mysql_orm_test.v'
}
testing.find_started_process('postgres') or { tsession.skip_files << 'vlib/pg/pg_orm_test.v' }
if github_job == 'windows-tcc' {
// TODO: fix these ASAP
tsession.skip_files << 'vlib/net/tcp_test.v'