tools: fix building `vdoctor.v` with `v build-tools`
ci/woodpecker/push/vc Pipeline was successful Details
ci/woodpecker/push/docker Pipeline was successful Details
ci/woodpecker/push/arch Pipeline was successful Details

Delyan Angelov 2022-05-04 23:30:44 +03:00 committed by Jef Roosens
parent f6e73f9f9a
commit c405c19168
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
3 changed files with 6 additions and 4 deletions

View File

@ -471,7 +471,7 @@ pub fn prepare_test_session(zargs string, folder string, oskipped []string, main
// for example module import tests, or subtests, that are compiled/run by other parent tests // for example module import tests, or subtests, that are compiled/run by other parent tests
// in specific configurations, etc. // in specific configurations, etc.
if fnormalised.contains('testdata/') || fnormalised.contains('modules/') if fnormalised.contains('testdata/') || fnormalised.contains('modules/')
|| f.contains('preludes/') { || fnormalised.contains('preludes/') {
continue continue
} }
$if windows { $if windows {
@ -489,7 +489,8 @@ pub fn prepare_test_session(zargs string, folder string, oskipped []string, main
skipped << skipped_f skipped << skipped_f
} }
for skip_prefix in oskipped { for skip_prefix in oskipped {
if f.starts_with(skip_prefix) { skip_folder := skip_prefix + '/'
if fnormalised.starts_with(skip_folder) {
continue next_file continue next_file
} }
} }

View File

@ -12,7 +12,8 @@ const efolders = [
fn main() { fn main() {
args_string := os.args[1..].join(' ') args_string := os.args[1..].join(' ')
params := args_string.all_before('build-examples') params := args_string.all_before('build-examples')
skip_prefixes := efolders.map(os.real_path(os.join_path_single(vroot, it))) skip_prefixes := efolders.map(os.real_path(os.join_path_single(vroot, it)).replace('\\',
'/'))
res := testing.v_build_failing_skipped(params, 'examples', skip_prefixes, fn (mut session testing.TestSession) { res := testing.v_build_failing_skipped(params, 'examples', skip_prefixes, fn (mut session testing.TestSession) {
for x in efolders { for x in efolders {
pathsegments := x.split_any('/') pathsegments := x.split_any('/')

View File

@ -31,7 +31,7 @@ fn main() {
// //
mut skips := []string{} mut skips := []string{}
for stool in tools_in_subfolders { for stool in tools_in_subfolders {
skips << os.join_path(tfolder, stool) skips << os.join_path(tfolder, stool).replace('\\', '/')
} }
buildopts := args_string.all_before('build-tools') buildopts := args_string.all_before('build-tools')
mut session := testing.prepare_test_session(buildopts, folder, skips, main_label) mut session := testing.prepare_test_session(buildopts, folder, skips, main_label)