From 25bf68e2f1e39c323593f70fdfa8a97671300b0f Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 28 Aug 2021 16:21:46 +0300 Subject: [PATCH] ci: os.chdir() fixes for windows jobs --- cmd/tools/vdoc/tests/vdoc_file_test.v | 4 ++-- cmd/tools/vsetup-freetype.v | 2 +- cmd/tools/vvet/vet_test.v | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/tools/vdoc/tests/vdoc_file_test.v b/cmd/tools/vdoc/tests/vdoc_file_test.v index cfee24bb9a..254337cb4b 100644 --- a/cmd/tools/vdoc/tests/vdoc_file_test.v +++ b/cmd/tools/vdoc/tests/vdoc_file_test.v @@ -14,9 +14,9 @@ fn find_diff_cmd() string { return diff.find_working_diff_command() or { '' } } -fn test_vet() { +fn test_vet() ? { os.setenv('VCOLORS', 'never', true) - os.chdir(vroot) + os.chdir(vroot) ? test_dir := 'cmd/tools/vdoc/tests/testdata' main_files := get_main_files_in_dir(test_dir) fails := check_path(vexe, test_dir, main_files) diff --git a/cmd/tools/vsetup-freetype.v b/cmd/tools/vsetup-freetype.v index c17ee6746a..16bbd2e2ea 100644 --- a/cmd/tools/vsetup-freetype.v +++ b/cmd/tools/vsetup-freetype.v @@ -11,7 +11,7 @@ fn main() { $if windows { println('Setup freetype...') vroot := os.dir(pref.vexe_path()) - os.chdir(vroot) + os.chdir(vroot) ? if os.is_dir(freetype_folder) { println('Thirdparty "freetype" is already installed.') } else { diff --git a/cmd/tools/vvet/vet_test.v b/cmd/tools/vvet/vet_test.v index 3291f20c7d..f2c8523370 100644 --- a/cmd/tools/vvet/vet_test.v +++ b/cmd/tools/vvet/vet_test.v @@ -11,10 +11,10 @@ fn find_diff_cmd() string { return res } -fn test_vet() { +fn test_vet() ? { vexe := os.getenv('VEXE') vroot := os.dir(vexe) - os.chdir(vroot) + os.chdir(vroot) ? test_dir := 'cmd/tools/vvet/tests' tests := get_tests_in_dir(test_dir) fails := check_path(vexe, test_dir, tests)