add test script for testing
Signed-off-by: Corbin Halliwill <challiwill@pivotal.io>
This commit is contained in:
committed by
Corbin Halliwill
parent
46361082cf
commit
df4c9d8ccf
24
scripts/test
24
scripts/test
@@ -1,18 +1,18 @@
|
||||
#!/bin/bash
|
||||
# vim: set ft=sh
|
||||
|
||||
set -eu
|
||||
set -e
|
||||
|
||||
export GOPATH=$PWD/gopath
|
||||
export PATH=$GOPATH/bin:$PATH
|
||||
not_installed() {
|
||||
! command -v $1 > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cd $GOPATH/src/github.com/concourse/github-release-resource
|
||||
github_release_resource_dir=$(realpath $(dirname $(dirname $0)))
|
||||
|
||||
export GOPATH=${PWD}/Godeps/_workspace:$GOPATH
|
||||
export PATH=${PWD}/Godeps/_workspace/bin:$PATH
|
||||
if not_installed ginkgo; then
|
||||
echo "# ginkgo is not installed! run the following command:"
|
||||
echo " go install github.com/onsi/ginkgo/ginkgo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
go install github.com/onsi/ginkgo/ginkgo
|
||||
|
||||
CGO_ENABLED=1 ginkgo -race -r -p "$@"
|
||||
|
||||
./scripts/build
|
||||
cd $github_release_resource_dir
|
||||
ginkgo -r -p
|
||||
|
Reference in New Issue
Block a user