When sudo(1)'ing to run the tests, use the abspath of the current user's

go(1) instead of whatever is in root's PATH.
This commit is contained in:
Sean Chittenden
2016-07-11 12:49:26 -07:00
parent e00d4cae6a
commit 25ac71b8b5

View File

@@ -10,9 +10,9 @@ go build -o $TEMPDIR/nomad || exit 1
# Run the tests
echo "--> Running tests"
printf "go(1) path: %s\n" "`which go`"
GOBIN="`which go`"
go list ./... | grep -v '/vendor/' | \
sudo \
-E PATH=$TEMPDIR:$PATH \
-E GOPATH=$GOPATH \
go test ${GOTEST_FLAGS:--cover -timeout=900s -v}
$GOBIN test ${GOTEST_FLAGS:--cover -timeout=900s -v}