]> Cypherpunks repositories - gostls13.git/commit
cmd/go, testing: add TB.ArtifactDir and -artifacts flag
authorDamien Neil <dneil@google.com>
Fri, 15 Aug 2025 22:24:05 +0000 (15:24 -0700)
committerDamien Neil <dneil@google.com>
Tue, 7 Oct 2025 21:39:32 +0000 (14:39 -0700)
commitbb1ca7ae81ea8ca49a2773ace8ccff8fbc7f4dfd
tree0b65e043ac16bc325d7c36e615c65715bcf06626
parent162392773085d4cc12072200853a0424117983c0
cmd/go, testing: add TB.ArtifactDir and -artifacts flag

Add TB.ArtifactDir, which returns a directory for a test to store
output files in. Add a -artifacts testflag which enables persistent
storage of artifacts in the output directory (-outputdir, or the
current directory by default).

Fixes #71287

Change-Id: I5f6515a6cd6c103f88588f4c033d5ea11ffd0c3c
Reviewed-on: https://go-review.googlesource.com/c/go/+/696399
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
api/next/71287.txt [new file with mode: 0644]
doc/next/6-stdlib/99-minor/testing/71287.md [new file with mode: 0644]
src/cmd/go/alldocs.go
src/cmd/go/internal/load/test.go
src/cmd/go/internal/test/flagdefs.go
src/cmd/go/internal/test/test.go
src/cmd/go/internal/test/testflag.go
src/cmd/internal/test2json/test2json.go
src/testing/internal/testdeps/deps.go
src/testing/testing.go
src/testing/testing_test.go