File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff 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.
1724pub fn file_size_greater_than (fpath string , min_fsize u64 ) {
1825 log.info ('path should exist `${fpath} ` ...' )
1926 if ! os.exists (fpath) {
Original file line number Diff line number Diff line change 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
135135fn 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
211211fn 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
334334fn 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')
Original file line number Diff line number Diff line change 1- import common { Task, exec }
1+ import common { Task, exec, unset }
22
33fn test_symlink() {
44 exec('v symlink')
@@ -98,7 +98,7 @@ fn build_v_with_prealloc() {
9898}
9999
100100fn 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')
You can’t perform that action at this time.
0 commit comments