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:
@ -19,6 +19,10 @@ pub const hide_oks = os.getenv('VTEST_HIDE_OK') == '1'
|
||||
|
||||
pub const fail_fast = os.getenv('VTEST_FAIL_FAST') == '1'
|
||||
|
||||
pub const is_node_present = os.execute('node --version').exit_code == 0
|
||||
|
||||
pub const all_processes = os.execute('ps ax').output.split_any('\r\n')
|
||||
|
||||
pub struct TestSession {
|
||||
pub mut:
|
||||
files []string
|
||||
@ -551,3 +555,12 @@ pub fn get_test_details(file string) TestDetails {
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
pub fn find_started_process(pname string) ?string {
|
||||
for line in testing.all_processes {
|
||||
if line.contains(pname) {
|
||||
return line
|
||||
}
|
||||
}
|
||||
return error('could not find process matching $pname')
|
||||
}
|
||||
|
Reference in New Issue
Block a user