Skip to content

Commit

Permalink
cmd/cue/cmd: testscript moved its gopath location
Browse files Browse the repository at this point in the history
See rogpeppe/go-internal#156;
the leading dot was added to "hide" the directory so that it is not
walked by commands such as `go list ./...`.

This broke our test, as we hard-coded the previous location via
`$WORK/gopath` to get to the default `GOBIN` location.
We can fix the tests and make them future-proof via `$GOPATH` instead.

The trybots didn't catch this on Gerrit as these are long tests.
I had forgotten that the long tests are opt-in,
and so the recent CL that bumped go-internal to v1.9.0 broke master.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I0203595f0352c6205deb22bff3a9a7ca2d06da07
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/542618
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
  • Loading branch information
mvdan committed Aug 24, 2022
1 parent 7292034 commit 4a73630
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/cue/cmd/testdata/script/install.txtar
Expand Up @@ -10,9 +10,9 @@
env GOPROXY=https://proxy.golang.org

# Sanity check pre install
! exists $WORK/gopath/bin/cue
! exists $GOPATH/bin/cue

# Install
go install cuelang.org/go/cmd/cue@latest
exec $WORK/gopath/bin/cue help
exec $GOPATH/bin/cue help
stdout 'cue evaluates CUE files'
4 changes: 2 additions & 2 deletions cmd/cue/cmd/testdata/script/install_contributing.txtar
Expand Up @@ -10,9 +10,9 @@
env GOPROXY=https://proxy.golang.org

# Sanity check pre install
! exists $WORK/gopath/bin/git-codereview
! exists $GOPATH/bin/git-codereview

# Install
go install golang.org/x/review/git-codereview@latest
exec $WORK/gopath/bin/git-codereview help
exec $GOPATH/bin/git-codereview help
stdout 'Git-codereview is a git helper'

0 comments on commit 4a73630

Please sign in to comment.