|
|
@ -1,6 +1,10 @@ |
|
|
|
#!/usr/bin/env bash |
|
|
|
#!/usr/bin/env bash |
|
|
|
set -e |
|
|
|
set -e |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Install all packages - this will make running the suite faster |
|
|
|
|
|
|
|
echo "--> Installing packages for faster tests" |
|
|
|
|
|
|
|
go install -tags="${GOTAGS}" -a ./... |
|
|
|
|
|
|
|
|
|
|
|
# If we are testing the API, build and install consul |
|
|
|
# If we are testing the API, build and install consul |
|
|
|
if grep -q "/consul/api" <<< "${GOFILES}"; then |
|
|
|
if grep -q "/consul/api" <<< "${GOFILES}"; then |
|
|
|
# Create a temp dir and clean it up on exit |
|
|
|
# Create a temp dir and clean it up on exit |
|
|
@ -13,10 +17,6 @@ if grep -q "/consul/api" <<< "${GOFILES}"; then |
|
|
|
PATH="${TEMPDIR}:${PATH}" |
|
|
|
PATH="${TEMPDIR}:${PATH}" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Install all packages - this will make running the suite faster |
|
|
|
|
|
|
|
echo "--> Installing packages for faster tests" |
|
|
|
|
|
|
|
go install -tags="${GOTAGS}" -a ./... |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Run the tests |
|
|
|
# Run the tests |
|
|
|
echo "--> Running tests" |
|
|
|
echo "--> Running tests" |
|
|
|
go test -timeout=360s -parallel=20 -tags="${GOTAGS}" ${GOFILES} ${TESTARGS} |
|
|
|
go test -timeout=360s -parallel=20 -tags="${GOTAGS}" ${GOFILES} ${TESTARGS} |
|
|
|