Skip to content

Commit

Permalink
update testscript to support code coverage with Go 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdan committed Feb 13, 2023
1 parent 859a587 commit 71db10b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/bluekeyes/go-gitdiff v0.7.0
github.com/frankban/quicktest v1.14.4
github.com/google/go-cmp v0.5.9
github.com/rogpeppe/go-internal v1.9.0
github.com/rogpeppe/go-internal v1.9.1-0.20230209130841-f0583b8402aa
golang.org/x/exp v0.0.0-20230206171751-46f607a40771
golang.org/x/mod v0.7.0
golang.org/x/tools v0.5.0
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.9.1-0.20230209130841-f0583b8402aa h1:ffzRZUxPxKUZiv+XButQiigyMv4dEvynFqEYbkFsHDw=
github.com/rogpeppe/go-internal v1.9.1-0.20230209130841-f0583b8402aa/go.mod h1:4DOBFiuQsmS6qjl8rsAMyM0e8miaqS/Wnm+9jQ5RiOU=
golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg=
golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func TestScript(t *testing.T) {
"GARBLE_CACHE_DIR="+userCacheDir,
)

if os.Getenv("TESTSCRIPT_COVER_DIR") != "" {
if os.Getenv("GOCOVERDIR") != "" {
// Don't reuse the build cache if we want to collect
// code coverage. Otherwise, many toolexec calls would
// be avoided and the coverage would be incomplete.
Expand Down

0 comments on commit 71db10b

Please sign in to comment.