github.com/kardianos/nomad@v0.1.3-0.20151022182107-b13df73ee850/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 -cover -timeout=40s