mirror of
https://github.com/vlang/v.git
synced 2025-09-11 08:25:42 -04:00
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:
parent
5c4f7ca871
commit
62cbc8befe
@ -5,6 +5,16 @@ import term
|
|||||||
|
|
||||||
const is_verbose = os.getenv('VTEST_SHOW_CMD') != ''
|
const is_verbose = os.getenv('VTEST_SHOW_CMD') != ''
|
||||||
const user_os = os.user_os()
|
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
|
// TODO: some logic copy pasted from valgrind_test.v and compiler_test.v, move to a module
|
||||||
fn test_native() {
|
fn test_native() {
|
||||||
@ -23,13 +33,6 @@ fn test_native() {
|
|||||||
dir := os.join_path(vroot, 'vlib', 'v', 'gen', 'native', 'tests')
|
dir := os.join_path(vroot, 'vlib', 'v', 'gen', 'native', 'tests')
|
||||||
files := os.ls(dir) or { panic(err) }
|
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()
|
tests := files.filter(it.ends_with('.vv')).sorted()
|
||||||
if tests.len == 0 {
|
if tests.len == 0 {
|
||||||
println('no native tests found')
|
println('no native tests found')
|
||||||
@ -144,3 +147,10 @@ fn test_native() {
|
|||||||
exit(1)
|
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'
|
||||||
|
}
|
||||||
|
@ -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'
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user