github.com/jmitchell/nomad@v0.1.3-0.20151007230021-7ab84c2862d8/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 ./... | PATH=$TEMPDIR:$PATH xargs -n1 go test -timeout=40s