mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
solaris: make 'v test-compiler' pass (stage 2)
This commit is contained in:
@ -11,7 +11,9 @@ import (
|
||||
pub struct TestSession {
|
||||
pub mut:
|
||||
files []string
|
||||
skip_files []string
|
||||
vexe string
|
||||
vroot string
|
||||
vargs string
|
||||
failed bool
|
||||
benchmark benchmark.Benchmark
|
||||
@ -19,9 +21,20 @@ pub mut:
|
||||
}
|
||||
|
||||
pub fn new_test_session(_vargs string) TestSession {
|
||||
mut skip_files := []string
|
||||
skip_files << '_non_existing_'
|
||||
$if solaris {
|
||||
skip_files << "examples/gg2.v"
|
||||
skip_files << "examples/pico/pico.v"
|
||||
skip_files << "examples/sokol_examples/fonts.v"
|
||||
skip_files << "examples/sokol_examples/drawing.v"
|
||||
}
|
||||
vargs := _vargs.replace('-silent', '')
|
||||
vexe := pref.vexe_path()
|
||||
return TestSession{
|
||||
vexe: pref.vexe_path()
|
||||
vexe: vexe
|
||||
vroot: os.dir(vexe)
|
||||
skip_files: skip_files
|
||||
vargs: vargs
|
||||
show_ok_tests: !_vargs.contains('-silent')
|
||||
}
|
||||
@ -91,7 +104,7 @@ fn worker_trunner(p mut sync.PoolProcessor, idx int, thread_id int) voidptr {
|
||||
}
|
||||
tls_bench.cstep = idx
|
||||
dot_relative_file := p.get_string_item(idx)
|
||||
relative_file := dot_relative_file.replace('./', '')
|
||||
relative_file := dot_relative_file.replace(ts.vroot + os.path_separator, '').replace('./', '')
|
||||
file := os.real_path(relative_file)
|
||||
// Ensure that the generated binaries will be stored in the temporary folder.
|
||||
// Remove them after a test passes/fails.
|
||||
@ -109,6 +122,12 @@ fn worker_trunner(p mut sync.PoolProcessor, idx int, thread_id int) voidptr {
|
||||
// eprintln('>>> v cmd: $cmd')
|
||||
ts.benchmark.step()
|
||||
tls_bench.step()
|
||||
if relative_file in ts.skip_files {
|
||||
ts.benchmark.skip()
|
||||
tls_bench.skip()
|
||||
eprintln(tls_bench.step_message_skip(relative_file))
|
||||
return sync.no_result
|
||||
}
|
||||
if show_stats {
|
||||
eprintln(term.h_divider('-'))
|
||||
status := os.system(cmd)
|
||||
|
Reference in New Issue
Block a user