mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user