From b60f88d81022e4172e44aef2f0bdade87ed6916d Mon Sep 17 00:00:00 2001 From: Than McIntosh Date: Mon, 29 Jul 2024 17:40:10 +0000 Subject: cmd/internal/script: new hook for adding in toolchain script conditions Introduce a new function AddToolChainScriptConditions that augments a default "script.Cond" set with a collection of useful conditions, including godebug/goexperiment, cgo, race support, buildmode, asan, msan, and so on. Having these conditions available makes it easier to write script tests that deal with specific build-flavor corner cases. The functions backing the new conditions are helper functions migrated over from the Go command's script test setup. Updates #68606. Change-Id: I14def1115b54dc47529c983abcd2c5ea9326b9de Reviewed-on: https://go-review.googlesource.com/c/go/+/601715 LUCI-TryBot-Result: Go LUCI Reviewed-by: Cherry Mui --- src/cmd/compile/testdata/script/script_test_basics.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'src/cmd/compile') diff --git a/src/cmd/compile/testdata/script/script_test_basics.txt b/src/cmd/compile/testdata/script/script_test_basics.txt index ecc28951a1..7fe99dbbc2 100644 --- a/src/cmd/compile/testdata/script/script_test_basics.txt +++ b/src/cmd/compile/testdata/script/script_test_basics.txt @@ -4,6 +4,7 @@ go build [!cgo] skip cc -c testdata/mumble.c +[GOEXPERIMENT:fieldtrack] help exec -- go.mod -- module main -- cgit v1.3