aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/testdata/script
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2024-07-29 17:40:10 +0000
committerThan McIntosh <thanm@google.com>2024-07-31 13:21:14 +0000
commitb60f88d81022e4172e44aef2f0bdade87ed6916d (patch)
treea37a6115cb048aea979ad51eb12f03cf6d9116fb /src/cmd/compile/testdata/script
parent86bec1ec198f2720c83bd232a72b800b4ea5a9f6 (diff)
downloadgo-b60f88d81022e4172e44aef2f0bdade87ed6916d.tar.xz
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/testdata/script')
-rw-r--r--src/cmd/compile/testdata/script/script_test_basics.txt1
1 files changed, 1 insertions, 0 deletions
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