Skip to content

Commit

Permalink
tests: make 'v test-self' pass under msys2/MINGW64 (#20010)
Browse files Browse the repository at this point in the history
  • Loading branch information
smalltalkman committed Nov 28, 2023
1 parent 6bafc28 commit 46086c0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions cmd/tools/modules/testing/common.v
Expand Up @@ -37,6 +37,8 @@ pub const fail_retry_delay_ms = get_fail_retry_delay_ms()

pub const is_node_present = os.execute('node --version').exit_code == 0

pub const is_go_present = os.execute('go version').exit_code == 0

pub const all_processes = get_all_processes()

pub const header_bytes_to_search_for_module_main = 500
Expand Down
6 changes: 5 additions & 1 deletion cmd/tools/vtest-self.v
Expand Up @@ -336,7 +336,11 @@ fn main() {

if !testing.is_node_present {
testroot := vroot + os.path_separator
tsession.skip_files << test_js_files.map(it.replace(testroot, ''))
tsession.skip_files << test_js_files.map(it.replace(testroot, '').replace('\\',
'/'))
}
if !testing.is_go_present {
tsession.skip_files << 'vlib/v/gen/golang/tests/golang_test.v'
}
testing.find_started_process('mysqld') or {
tsession.skip_files << 'vlib/db/mysql/mysql_orm_test.v'
Expand Down
2 changes: 1 addition & 1 deletion vlib/os/os_windows.c.v
Expand Up @@ -324,7 +324,7 @@ pub fn raw_execute(cmd string) Result {
lp_reserved: unsafe { nil }
lp_desktop: unsafe { nil }
lp_title: unsafe { nil }
cb: sizeof(C.PROCESS_INFORMATION)
cb: sizeof(StartupInfo)
h_std_input: child_stdin
h_std_output: child_stdout_write
h_std_error: child_stdout_write
Expand Down
2 changes: 1 addition & 1 deletion vlib/v/gen/c/testdata/console_windows_program.vv
@@ -1,4 +1,4 @@
// vtest vflags: -cc msvc -os windows
// vtest vflags: -os windows

@[console]
fn main() {
Expand Down
2 changes: 1 addition & 1 deletion vlib/v/gen/c/testdata/gui_windows_program.vv
@@ -1,4 +1,4 @@
// vtest vflags: -cc msvc -os windows
// vtest vflags: -os windows
import sokol

const used_import = sokol.used_import
Expand Down
@@ -1,4 +1,4 @@
// vtest vflags: -cc msvc -os windows
// vtest vflags: -os windows
import sokol

const used_import = sokol.used_import
Expand Down

0 comments on commit 46086c0

Please sign in to comment.