diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c35bd720e9..3339dcd40c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -715,10 +715,16 @@ jobs: - name: v doctor run: | ./v doctor + - name: Verify `v test` works run: | .\v.exe cmd/tools/test_if_v_test_system_works.v .\cmd\tools\test_if_v_test_system_works.exe + + - name: Verify `v vlib/v/gen/c/coutput_test.v` works + run: | + .\v.exe vlib/v/gen/c/coutput_test.v + - name: Make sure running TCC64 instead of TCC32 run: ./v test .github\workflows\make_sure_ci_run_with_64bit_compiler_test.v @@ -753,11 +759,16 @@ jobs: run: .\v.exe -o v.c cmd/v && .\thirdparty\tcc\tcc.exe -Werror -w -ladvapi32 -bt10 v.c - name: v doctor run: ./v doctor + - name: Verify `v test` works run: | .\v.exe cmd/tools/test_if_v_test_system_works.v .\cmd\tools\test_if_v_test_system_works.exe + - name: Verify `v vlib/v/gen/c/coutput_test.v` works + run: | + .\v.exe vlib/v/gen/c/coutput_test.v + - name: Make sure running TCC32 instead of TCC64 run: ./v -stats .github\workflows\make_sure_ci_run_with_32bit_compiler_test.v diff --git a/vlib/v/gen/c/coutput_test.v b/vlib/v/gen/c/coutput_test.v index 140e6c09e6..7ba977fcdb 100644 --- a/vlib/v/gen/c/coutput_test.v +++ b/vlib/v/gen/c/coutput_test.v @@ -6,13 +6,14 @@ import v.util.vtest const vexe = @VEXE -const vroot = @VMODROOT +const vroot = os.real_path(@VMODROOT).replace('./', '') const testdata_folder = os.join_path(vroot, 'vlib', 'v', 'gen', 'c', 'testdata') const diff_cmd = diff.find_working_diff_command() or { '' } fn test_out_files() ? { + eprintln('> vroot: $vroot') println(term.colorize(term.green, '> testing whether .out files match:')) os.chdir(vroot) output_path := os.join_path(os.temp_dir(), 'coutput', 'out') @@ -147,7 +148,7 @@ fn normalize_panic_message(message string, vroot string) string { } fn vroot_relative(path string) string { - return path.replace(os.path_separator, '/').replace('$vroot/', '') + return path.replace(os.path_separator, '/').replace('$vroot/', '').replace('./', '') } fn ensure_compilation_succeeded(compilation os.Result) {