2015-06-01 13:25:51 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-02-12 18:02:16 +00:00
|
|
|
export GO15VENDOREXPERIMENT=1
|
|
|
|
|
2015-06-01 13:25:51 +00:00
|
|
|
# Create a temp dir and clean it up on exit
|
|
|
|
TEMPDIR=`mktemp -d -t nomad-test.XXX`
|
|
|
|
trap "rm -rf $TEMPDIR" EXIT HUP INT QUIT TERM
|
|
|
|
|
|
|
|
# Build the Nomad binary for the API tests
|
|
|
|
echo "--> Building nomad"
|
|
|
|
go build -o $TEMPDIR/nomad || exit 1
|
|
|
|
|
|
|
|
# Run the tests
|
|
|
|
echo "--> Running tests"
|
2016-01-20 20:00:20 +00:00
|
|
|
go list ./... | sudo -E PATH=$TEMPDIR:$PATH xargs -n1 go test -cover -timeout=180s
|