test-compiler: fix sporadic fails for vpm/v install
parent
d1e52620c7
commit
e02f25a108
|
@ -69,10 +69,7 @@ pub fn (mut ts TestSession) test() {
|
|||
if current_wd == os.wd_at_startup && current_wd == ts.vroot {
|
||||
ts.root_relative = true
|
||||
}
|
||||
now := time.sys_mono_now()
|
||||
new_vtmp_dir := os.join_path(os.temp_dir(), 'v', 'test_session_$now')
|
||||
os.mkdir_all(new_vtmp_dir)
|
||||
os.setenv('VTMP', new_vtmp_dir, true)
|
||||
new_vtmp_dir := setup_new_vtmp_folder()
|
||||
//
|
||||
ts.init()
|
||||
mut remaining_files := []string{}
|
||||
|
@ -333,3 +330,11 @@ pub fn eheader(msg string) {
|
|||
pub fn header(msg string) {
|
||||
println(term.header(msg, '-'))
|
||||
}
|
||||
|
||||
pub fn setup_new_vtmp_folder() string {
|
||||
now := time.sys_mono_now()
|
||||
new_vtmp_dir := os.join_path(os.temp_dir(), 'v', 'test_session_$now')
|
||||
os.mkdir_all(new_vtmp_dir)
|
||||
os.setenv('VTMP', new_vtmp_dir, true)
|
||||
return new_vtmp_dir
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ fn v_test_compiler(vargs string) {
|
|||
exit(1)
|
||||
}
|
||||
*/
|
||||
|
||||
// Make sure v.c can be compiled without warnings
|
||||
$if macos {
|
||||
if os.exists('/cmd/v') {
|
||||
|
@ -46,8 +45,11 @@ fn v_test_compiler(vargs string) {
|
|||
eprintln('')
|
||||
building_examples_failed := testing.v_build_failing(vargs, 'examples')
|
||||
eprintln('')
|
||||
building_live_failed := testing.v_build_failing(vargs + '-live', os.join_path('examples', 'hot_reload'))
|
||||
building_live_failed := testing.v_build_failing(vargs + '-live', os.join_path('examples',
|
||||
'hot_reload'))
|
||||
eprintln('')
|
||||
//
|
||||
testing.setup_new_vtmp_folder()
|
||||
v_module_install_cmd := '$vexe install nedpals.args'
|
||||
eprintln('')
|
||||
testing.eheader('Installing a v module with: $v_module_install_cmd')
|
||||
|
@ -62,6 +64,7 @@ fn v_test_compiler(vargs string) {
|
|||
}
|
||||
vmark.stop()
|
||||
eprintln('Installing a v module took: ' + vmark.total_duration().str() + 'ms')
|
||||
//
|
||||
if building_tools_failed || compiler_test_session.failed || building_examples_failed || building_live_failed {
|
||||
exit(1)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue