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

tests: skip vlib/v/gen/js/jsgen_test.v when there is no node --version working

This commit is contained in:
Delyan Angelov 2021-01-17 19:21:18 +02:00
parent 2677fcdf0c
commit fafd949770
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -103,8 +103,19 @@ pub fn (mut ts TestSession) print_messages() {
}
}
fn is_nodejs_working() bool {
node_res := os.exec('node --version') or { return false }
if node_res.exit_code != 0 {
return false
}
return true
}
pub fn new_test_session(_vargs string) TestSession {
mut skip_files := []string{}
if !is_nodejs_working() {
skip_files << 'vlib/v/gen/js/jsgen_test.v'
}
$if solaris {
skip_files << 'examples/gg/gg2.v'
skip_files << 'examples/pico/pico.v'