ci: more args = os.args fixes

pull/7430/head^2
Delyan Angelov 2020-12-20 19:01:02 +02:00
parent 5f5c53348b
commit c2064b2cc0
4 changed files with 11 additions and 13 deletions

View File

@ -4,8 +4,7 @@ import os
import testing
fn main() {
args := os.args
args_string := args[1..].join(' ')
args_string := os.args[1..].join(' ')
params := args_string.all_before('build-examples')
if testing.v_build_failing(params, 'examples') {
exit(1)

View File

@ -10,16 +10,16 @@ fn p(s string) string {
}
fn main() {
args := os.args
args_string := args[1..].join(' ')
args_string := os.args[1..].join(' ')
skips := []string{}
vexe := os.getenv('VEXE')
vroot := os.dir(vexe)
util.ensure_modules_for_all_tools_are_installed('-v' in args)
util.ensure_modules_for_all_tools_are_installed('-v' in os.args)
folder := 'cmd/tools'
main_label := 'Building $folder ...'
finish_label := 'building $folder'
mut session := testing.prepare_test_session(args_string.all_before('build-tools'), folder, skips, main_label)
mut session := testing.prepare_test_session(args_string.all_before('build-tools'),
folder, skips, main_label)
session.rm_binaries = false
session.test()
eprintln(session.benchmark.total_message(finish_label))
@ -27,10 +27,11 @@ fn main() {
exit(1)
}
//
mut executables := os.ls(session.vtmp_dir)?
mut executables := os.ls(session.vtmp_dir) ?
executables.sort()
executables = executables.filter(it !in ['gen1m', 'gen_vc', 'fast', 'wyhash'])
for exe in executables {
os.mv_by_cp(os.join_path(session.vtmp_dir, exe), os.join_path(vroot, 'cmd', 'tools', exe))
os.mv_by_cp(os.join_path(session.vtmp_dir, exe), os.join_path(vroot, 'cmd', 'tools',
exe))
}
}

View File

@ -6,8 +6,7 @@ import benchmark
import v.pref
fn main() {
args := os.args
args_string := args[1..].join(' ')
args_string := os.args[1..].join(' ')
v_test_compiler(args_string.all_before('test-compiler'))
}

View File

@ -45,10 +45,9 @@ fn a_times_transp(mut v []f64, u []f64) {
}
fn main() {
args := os.args
mut n := 0
if args.len == 2 {
n = strconv.atoi(args[1])
if os.args.len == 2 {
n = strconv.atoi(os.args[1])
} else {
n = 0
}