[go] cmd/go, testing: add TB.ArtifactDir and -artifacts flag

1 view
Skip to first unread message

Damien Neil (Gerrit)

unread,
Oct 7, 2025, 5:39:37 PM (14 hours ago) Oct 7
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Alan Donovan, golang-co...@googlegroups.com

Damien Neil submitted the change

Unreviewed changes

6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
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-by: Alan Donovan <adon...@google.com>
Files:
  • A api/next/71287.txt
  • A doc/next/6-stdlib/99-minor/testing/71287.md
  • M src/cmd/go/alldocs.go
  • M src/cmd/go/internal/load/test.go
  • M src/cmd/go/internal/test/flagdefs.go
  • M src/cmd/go/internal/test/test.go
  • M src/cmd/go/internal/test/testflag.go
  • M src/cmd/internal/test2json/test2json.go
  • M src/testing/internal/testdeps/deps.go
  • M src/testing/testing.go
  • M src/testing/testing_test.go
Change size: L
Delta: 11 files changed, 333 insertions(+), 71 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Alan Donovan
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I5f6515a6cd6c103f88588f4c033d5ea11ffd0c3c
Gerrit-Change-Number: 696399
Gerrit-PatchSet: 11
Gerrit-Owner: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages