blob: 9a4b9d7b40c7264ea9cec6df11a66006be3a41fe [file] [log] [blame]
[short] skip
env GO111MODULE=on
# Set up fresh GOCACHE.
env GOCACHE=$WORK/gocache
mkdir $GOCACHE
cd $WORK
go build -o a.out
# Varying -trimpath should cause a rebuild.
go build -x -o a.out -trimpath
stderr '(compile|gccgo)( |\.exe)'
stderr 'link( |\.exe)'
# Two distinct versions of the same module with identical content should
# still be cached separately.
# Verifies
go get -d
go run -trimpath printstack.go
stdout '^$'
go get -d
go run -trimpath printstack.go
stdout '^$'
-- $WORK/hello.go --
package main
func main() { println("hello") }
-- $WORK/printstack.go --
// +build ignore
package main
import (
func main() {
-- $WORK/go.mod --
module m
go 1.14