all: update chdir usages
parent
853d3cb83e
commit
29f550158e
|
@ -444,7 +444,7 @@ pub fn building_any_v_binaries_failed() bool {
|
||||||
vexe := pref.vexe_path()
|
vexe := pref.vexe_path()
|
||||||
parent_dir := os.dir(vexe)
|
parent_dir := os.dir(vexe)
|
||||||
vlib_should_be_present(parent_dir)
|
vlib_should_be_present(parent_dir)
|
||||||
os.chdir(parent_dir)
|
os.chdir(parent_dir) or { panic(err) }
|
||||||
mut failed := false
|
mut failed := false
|
||||||
v_build_commands := ['$vexe -o v_g -g cmd/v', '$vexe -o v_prod_g -prod -g cmd/v',
|
v_build_commands := ['$vexe -o v_g -g cmd/v', '$vexe -o v_prod_g -prod -g cmd/v',
|
||||||
'$vexe -o v_cg -cg cmd/v', '$vexe -o v_prod_cg -prod -cg cmd/v',
|
'$vexe -o v_cg -cg cmd/v', '$vexe -o v_prod_cg -prod -cg cmd/v',
|
||||||
|
|
|
@ -133,7 +133,7 @@ const (
|
||||||
fn main() {
|
fn main() {
|
||||||
vexe := pref.vexe_path()
|
vexe := pref.vexe_path()
|
||||||
vroot := os.dir(vexe)
|
vroot := os.dir(vexe)
|
||||||
os.chdir(vroot)
|
os.chdir(vroot) or { panic(err) }
|
||||||
args := os.args.clone()
|
args := os.args.clone()
|
||||||
args_string := args[1..].join(' ')
|
args_string := args[1..].join(' ')
|
||||||
cmd_prefix := args_string.all_before('test-self')
|
cmd_prefix := args_string.all_before('test-self')
|
||||||
|
|
|
@ -5,7 +5,7 @@ const source = 'vlib/flag/testdata/simplest_flag_program.v'
|
||||||
const simple_flag_app_executable = os.real_path(os.join_path(os.cache_dir(), 'simple_flag_app.exe'))
|
const simple_flag_app_executable = os.real_path(os.join_path(os.cache_dir(), 'simple_flag_app.exe'))
|
||||||
|
|
||||||
fn testsuite_begin() {
|
fn testsuite_begin() {
|
||||||
os.chdir(@VMODROOT)
|
os.chdir(@VMODROOT) or {}
|
||||||
os.rm(simple_flag_app_executable) or {}
|
os.rm(simple_flag_app_executable) or {}
|
||||||
res := os.execute('${@VEXE} -o $simple_flag_app_executable $source')
|
res := os.execute('${@VEXE} -o $simple_flag_app_executable $source')
|
||||||
assert res.exit_code == 0
|
assert res.exit_code == 0
|
||||||
|
|
|
@ -5,7 +5,7 @@ const the_source = 'vlib/flag/testdata/usage_example.v'
|
||||||
const the_executable = os.real_path(os.join_path(os.cache_dir(), 'flag_usage_example_app.exe'))
|
const the_executable = os.real_path(os.join_path(os.cache_dir(), 'flag_usage_example_app.exe'))
|
||||||
|
|
||||||
fn testsuite_begin() {
|
fn testsuite_begin() {
|
||||||
os.chdir(@VMODROOT)
|
os.chdir(@VMODROOT) or {}
|
||||||
os.rm(the_executable) or {}
|
os.rm(the_executable) or {}
|
||||||
res := os.execute('${@VEXE} -o $the_executable $the_source')
|
res := os.execute('${@VEXE} -o $the_executable $the_source')
|
||||||
assert res.exit_code == 0
|
assert res.exit_code == 0
|
||||||
|
|
Loading…
Reference in New Issue