ci: move test in pe_test.v to native_test.v (both used -b native, competing the creation of the backend executable => CI failures on the gcc-windows job)

This commit is contained in:
Delyan Angelov 2025-02-27 07:23:35 +02:00
parent 5c4f7ca871
commit 62cbc8befe
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 17 additions and 16 deletions

View File

@ -5,6 +5,16 @@ import term
const is_verbose = os.getenv('VTEST_SHOW_CMD') != ''
const user_os = os.user_os()
const wrkdir = os.join_path(os.vtmp_dir(), 'native_tests')
fn testsuite_begin() {
os.mkdir_all(wrkdir) or {}
os.chdir(wrkdir) or {}
}
fn testsuite_end() {
os.rmdir_all(wrkdir) or {}
}
// TODO: some logic copy pasted from valgrind_test.v and compiler_test.v, move to a module
fn test_native() {
@ -23,13 +33,6 @@ fn test_native() {
dir := os.join_path(vroot, 'vlib', 'v', 'gen', 'native', 'tests')
files := os.ls(dir) or { panic(err) }
wrkdir := os.join_path(os.vtmp_dir(), 'native_tests')
os.mkdir_all(wrkdir) or { panic(err) }
defer {
os.rmdir_all(wrkdir) or {}
}
os.chdir(wrkdir) or {}
tests := files.filter(it.ends_with('.vv')).sorted()
if tests.len == 0 {
println('no native tests found')
@ -144,3 +147,10 @@ fn test_native() {
exit(1)
}
}
fn test_prevent_could_not_find_symbols_regression() {
res := os.execute('${os.quoted_path(@VEXE)} -b native ${os.quoted_path(os.join_path(@VROOT,
'examples/hello_world.v'))}')
assert !res.output.contains('CaptureStackBackTrace'), 'Test failed system unable to find symbol: CaptureStackBackTrace'
assert !res.output.contains('__debugbreak'), 'Test failed system unable to find symbol: __debugbreak'
}

View File

@ -1,9 +0,0 @@
module tests
import os
fn test_prevent_could_not_find_symbols_regression() {
res := os.execute('${os.quoted_path(@VEXE)} -b native examples/hello_world.v')
assert !res.output.contains('CaptureStackBackTrace'), 'Test failed system unable to find symbol: CaptureStackBackTrace'
assert !res.output.contains('__debugbreak'), 'Test failed system unable to find symbol: __debugbreak'
}