Skip to content

Commit cfc3dd0

Browse files
committed
ci: fix unsetting of VFLAGS in v run ci/linux_ci.vsh v_self_compilation_usecache_clang
1 parent b39a585 commit cfc3dd0

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

ci/common/runner.v

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ pub fn exec(command string) {
1414
}
1515
}
1616

17+
// unset is a helper function to unset a specific env variable.
18+
pub fn unset(evar string) {
19+
log.info('unsetting env variable: ${evar}')
20+
os.unsetenv(evar)
21+
}
22+
23+
// file_size_greater_than asserts that the given file exists, and is at least min_fsize bytes long.
1724
pub fn file_size_greater_than(fpath string, min_fsize u64) {
1825
log.info('path should exist `${fpath}` ...')
1926
if !os.exists(fpath) {

ci/linux_ci.vsh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import common { Task, exec }
1+
import common { Task, exec, unset }
22

33
//
44
// Shared tasks/helpers
@@ -133,7 +133,7 @@ fn build_fast_tcc() {
133133
}
134134
135135
fn v_self_compilation_usecache_tcc() {
136-
exec('unset VFLAGS')
136+
unset('VFLAGS')
137137
138138
exec('v wipe-cache')
139139
exec('v -usecache examples/hello_world.v')
@@ -209,7 +209,7 @@ fn v_self_compilation_gcc() {
209209
}
210210
211211
fn v_self_compilation_usecache_gcc() {
212-
exec('unset VFLAGS')
212+
unset('VFLAGS')
213213
214214
exec('v wipe-cache')
215215
exec('v -usecache examples/hello_world.v')
@@ -332,7 +332,7 @@ fn v_self_compilation_clang() {
332332
}
333333
334334
fn v_self_compilation_usecache_clang() {
335-
exec('unset VFLAGS')
335+
unset('VFLAGS')
336336
337337
exec('v wipe-cache')
338338
exec('v -usecache examples/hello_world.v')

ci/macos_ci.vsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import common { Task, exec }
1+
import common { Task, exec, unset }
22

33
fn test_symlink() {
44
exec('v symlink')
@@ -98,7 +98,7 @@ fn build_v_with_prealloc() {
9898
}
9999
100100
fn v_self_compilation_usecache() {
101-
exec('unset VFLAGS')
101+
unset('VFLAGS')
102102
exec('v -usecache examples/hello_world.v')
103103
exec('./examples/hello_world')
104104
exec('v -o v2 -usecache cmd/v')

0 commit comments

Comments
 (0)