github.com/dkerwin/nomad@v0.3.3-0.20160525181927-74554135514b/scripts/test.sh (about) 1 #!/usr/bin/env bash 2 3 # Create a temp dir and clean it up on exit 4 TEMPDIR=`mktemp -d -t nomad-test.XXX` 5 trap "rm -rf $TEMPDIR" EXIT HUP INT QUIT TERM 6 7 # Build the Nomad binary for the API tests 8 echo "--> Building nomad" 9 go build -o $TEMPDIR/nomad || exit 1 10 11 # Run the tests 12 echo "--> Running tests" 13 go list ./... | grep -v '/vendor/' | sudo -E PATH=$TEMPDIR:$PATH xargs -n1 go test -cover -timeout=360s