From 1941c0b22d40dff0c238f959468e77365cfa5a14 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 4 Dec 2024 02:12:38 +0200 Subject: [PATCH] tests: add @[markused] to `const turn_off_vcolors = os.setenv(VCOLORS, never, true)`, that just use the side effect of os.setenv, to fix `v test-self` run locally (on the CI, it is the default, so not setting it does not matter). --- vlib/v/compiler_errors_test.v | 1 + vlib/v/slow_tests/inout/compiler_test.v | 1 + vlib/v/slow_tests/repl/repl_test.v | 1 + vlib/v/slow_tests/valgrind/valgrind_test.v | 1 + .../tests/multiple_paths_in_vmodules/vmodules_overrides_test.v | 1 + vlib/v/tests/run_v_code_from_stdin_test.v | 2 ++ 6 files changed, 7 insertions(+) diff --git a/vlib/v/compiler_errors_test.v b/vlib/v/compiler_errors_test.v index 44633996ee..ef0d7d4918 100644 --- a/vlib/v/compiler_errors_test.v +++ b/vlib/v/compiler_errors_test.v @@ -30,6 +30,7 @@ const skip_on_ci_musl = [ const vexe = os.getenv('VEXE') +@[markused] const turn_off_vcolors = os.setenv('VCOLORS', 'never', true) const show_cmd = os.getenv('VTEST_SHOW_CMD') != '' diff --git a/vlib/v/slow_tests/inout/compiler_test.v b/vlib/v/slow_tests/inout/compiler_test.v index ffdc32c909..d96b588ee2 100644 --- a/vlib/v/slow_tests/inout/compiler_test.v +++ b/vlib/v/slow_tests/inout/compiler_test.v @@ -7,6 +7,7 @@ import term import v.util.diff import v.util.vtest +@[markused] const turn_off_vcolors = os.setenv('VCOLORS', 'never', true) const v_ci_ubuntu_musl = os.getenv('V_CI_UBUNTU_MUSL').len > 0 diff --git a/vlib/v/slow_tests/repl/repl_test.v b/vlib/v/slow_tests/repl/repl_test.v index 66834a3b7e..d69300f0e6 100644 --- a/vlib/v/slow_tests/repl/repl_test.v +++ b/vlib/v/slow_tests/repl/repl_test.v @@ -5,6 +5,7 @@ import v.slow_tests.repl.runner import benchmark import sync.pool +@[markused] const turn_off_vcolors = os.setenv('VCOLORS', 'never', true) fn test_the_v_compiler_can_be_invoked() { diff --git a/vlib/v/slow_tests/valgrind/valgrind_test.v b/vlib/v/slow_tests/valgrind/valgrind_test.v index 00bb672b8a..d9eed256dd 100644 --- a/vlib/v/slow_tests/valgrind/valgrind_test.v +++ b/vlib/v/slow_tests/valgrind/valgrind_test.v @@ -3,6 +3,7 @@ import term import benchmark import v.util.vtest +@[markused] const turn_off_vcolors = os.setenv('VCOLORS', 'never', true) fn bold(s string) string { diff --git a/vlib/v/tests/multiple_paths_in_vmodules/vmodules_overrides_test.v b/vlib/v/tests/multiple_paths_in_vmodules/vmodules_overrides_test.v index bb1119fd47..3420324830 100644 --- a/vlib/v/tests/multiple_paths_in_vmodules/vmodules_overrides_test.v +++ b/vlib/v/tests/multiple_paths_in_vmodules/vmodules_overrides_test.v @@ -1,5 +1,6 @@ import os +@[markused] const turn_off_vcolors = os.setenv('VCOLORS', 'never', true) const vexe = os.getenv('VEXE') diff --git a/vlib/v/tests/run_v_code_from_stdin_test.v b/vlib/v/tests/run_v_code_from_stdin_test.v index 4e873922af..81d34ddfb0 100644 --- a/vlib/v/tests/run_v_code_from_stdin_test.v +++ b/vlib/v/tests/run_v_code_from_stdin_test.v @@ -2,6 +2,8 @@ import os const vtmp_folder = os.join_path(os.vtmp_dir(), 'run_v_code_tests') const vexe = os.getenv('VEXE') + +@[markused] const turn_off_vcolors = os.setenv('VCOLORS', 'never', true) fn test_vexe_is_set() {