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 <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
7b5b9f5ce2
commit
85827f7503
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user