From 1d3467ea2e284277c47648f9adea1ca967307636 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 23 Nov 2025 11:47:57 +0200 Subject: [PATCH] ci: skip very long tests that are not relevant for the sanitized jobs (improve iteration time for relevant ones) (#25810) --- cmd/tools/modules/testing/common.v | 3 +++ vlib/gg/draw_fns_api_test.v | 2 +- vlib/v/gen/c/coutput_test.v | 2 +- vlib/v/gen/golang/tests/golang_test.v | 2 +- vlib/v/gen/native/tests/native_test.v | 2 +- vlib/v/tests/builtin_overflow_test.v | 2 +- .../tests/multiple_paths_in_vmodules/vmodules_overrides_test.v | 1 + vlib/v/tests/trace_calls_test.v | 2 +- vlib/veb/tests/veb_test.v | 1 + vlib/vweb/tests/vweb_test.v | 2 +- 10 files changed, 12 insertions(+), 7 deletions(-) diff --git a/cmd/tools/modules/testing/common.v b/cmd/tools/modules/testing/common.v index a29d6d396..4a1a90500 100644 --- a/cmd/tools/modules/testing/common.v +++ b/cmd/tools/modules/testing/common.v @@ -933,6 +933,9 @@ pub const is_started_redis = find_started_process('redis-server') or { '' } pub fn (mut ts TestSession) setup_build_environment() { facts, mut defines := pref.get_build_facts_and_defines() // add the runtime information, that the test runner has already determined by checking once: + if github_job.starts_with('sanitize-') { + defines << 'sanitized_job' + } if is_started_mysqld != '' { defines << 'started_mysqld' } diff --git a/vlib/gg/draw_fns_api_test.v b/vlib/gg/draw_fns_api_test.v index da8d1e33d..2f293fce6 100644 --- a/vlib/gg/draw_fns_api_test.v +++ b/vlib/gg/draw_fns_api_test.v @@ -1,4 +1,4 @@ -// vtest build: !musl? +// vtest build: !musl? && !sanitized_job? import os fn test_all_samples_can_be_compiled() { diff --git a/vlib/v/gen/c/coutput_test.v b/vlib/v/gen/c/coutput_test.v index 2b25bf3c9..018b6e1bc 100644 --- a/vlib/v/gen/c/coutput_test.v +++ b/vlib/v/gen/c/coutput_test.v @@ -1,4 +1,4 @@ -// vtest build: !self_sandboxed_packaging? +// vtest build: !self_sandboxed_packaging? && !sanitized_job? import os import time import term diff --git a/vlib/v/gen/golang/tests/golang_test.v b/vlib/v/gen/golang/tests/golang_test.v index c3964bb51..8557b6fd7 100644 --- a/vlib/v/gen/golang/tests/golang_test.v +++ b/vlib/v/gen/golang/tests/golang_test.v @@ -1,4 +1,4 @@ -// vtest build: present_go? +// vtest build: present_go? && !sanitized_job? import os import benchmark import term diff --git a/vlib/v/gen/native/tests/native_test.v b/vlib/v/gen/native/tests/native_test.v index 90c29ff40..ec93068b2 100644 --- a/vlib/v/gen/native/tests/native_test.v +++ b/vlib/v/gen/native/tests/native_test.v @@ -1,4 +1,4 @@ -// vtest build: (amd64 || arm64) && !self_sandboxed_packaging? && !gcc-windows && !native-backend-windows && !tcc-windows && !msvc-windows +// vtest build: (amd64 || arm64) && !self_sandboxed_packaging? && !gcc-windows && !native-backend-windows && !tcc-windows && !msvc-windows && !sanitized_job? // NOTE: native-backend-windows passed with the windows-2019 runner, but fails with windows-2022. TODO: fix @[has_globals] module main diff --git a/vlib/v/tests/builtin_overflow_test.v b/vlib/v/tests/builtin_overflow_test.v index 9c096e65c..481a71236 100644 --- a/vlib/v/tests/builtin_overflow_test.v +++ b/vlib/v/tests/builtin_overflow_test.v @@ -1,4 +1,4 @@ -// vtest build: !self_sandboxed_packaging? +// vtest build: !self_sandboxed_packaging? && !sanitized_job? import os import time import term 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 342032483..3bf10b5bb 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,3 +1,4 @@ +// vtest build: !sanitize-memory-gcc && !sanitized_job? import os @[markused] diff --git a/vlib/v/tests/trace_calls_test.v b/vlib/v/tests/trace_calls_test.v index 46bb44020..7587472e3 100644 --- a/vlib/v/tests/trace_calls_test.v +++ b/vlib/v/tests/trace_calls_test.v @@ -1,4 +1,4 @@ -// vtest build: !(os_id_ubuntu? && musl?) +// vtest build: !(os_id_ubuntu? && musl?) && !sanitized_job? import os const vexe = @VEXE diff --git a/vlib/veb/tests/veb_test.v b/vlib/veb/tests/veb_test.v index 9ceb8eced..7bd34dade 100644 --- a/vlib/veb/tests/veb_test.v +++ b/vlib/veb/tests/veb_test.v @@ -1,3 +1,4 @@ +// vtest build: !sanitized_job? import os import time import x.json2 as json diff --git a/vlib/vweb/tests/vweb_test.v b/vlib/vweb/tests/vweb_test.v index 4147e0fc0..5d7acbc94 100644 --- a/vlib/vweb/tests/vweb_test.v +++ b/vlib/vweb/tests/vweb_test.v @@ -1,4 +1,4 @@ -// vtest build: !windows +// vtest build: !windows && !sanitized_job? import io import x.json2 as json import time -- 2.39.5