1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

test-compiler: fix sporadic fails for vpm/v install

This commit is contained in:
Delyan Angelov
2020-10-14 18:20:19 +03:00
parent d1e52620c7
commit e02f25a108
2 changed files with 16 additions and 8 deletions

View File

@ -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
}