From 85827f75039f2a9cb235b7537ab76ac59c6d2654 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 6 Apr 2026 02:04:59 +0000 Subject: [PATCH] ci: fix Windows benchmarks running all tests instead of just benchmarks The -run "^$" flag was being mangled by cmd.exe's argument processing. The ^ character is cmd.exe's escape character, so go.cmd's cmd.exe layer eats it, turning -run "^$" into -run "$" which matches all test names. This caused the benchmark job to run every test, leading to timeouts and Go runtime crashes. Use -run XXXXNothingXXXX instead, which avoids special characters entirely. Updates #19252 Change-Id: I888c124254dd2767a40b61bcd68dbc9b22ad35a1 Signed-off-by: Brad Fitzpatrick --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46bc1cc4b..f73e8178d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -273,7 +273,10 @@ jobs: # Don't use -bench=. -benchtime=1x. # Somewhere in the layers (powershell?) # the equals signs cause great confusion. - run: ./tool/go test ./... -bench . -benchtime 1x -run "^$" + # Don't use -run "^$" either; the ^ is cmd.exe's escape + # character, so go.cmd's cmd.exe layer eats it, turning + # -run "^$" into -run "$" which matches all test names. + run: ./tool/go test ./... -bench . -benchtime 1x -run XXXXNothingXXXX env: NOPWSHDEBUG: "true" # to quiet tool/gocross/gocross-wrapper.ps1 in CI