Skip to content

Commit

Permalink
Extract ginkgo tests to test-unit script
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Stegman <[email protected]>
  • Loading branch information
maximilien committed Jul 25, 2014
1 parent 0be818a commit 6761061
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/ci
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ bin=$(dirname $0)
$bin/go get code.google.com/p/go.tools/cmd/vet
$bin/go get github.com/golang/lint/golint

exec $bin/test
exec $bin/test-unit
10 changes: 1 addition & 9 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,11 @@ result=0

bin=$(dirname $0)

# Travis randomly kills go builds when using -race
race=$([ "$TRAVIS" != "true" ] && echo "-race")

echo -e "\n Formatting packages..."
$bin/go fmt github.com/cloudfoundry/bosh-agent/...
let "result+=$?"

echo -e "\n Installing ginkgo..."
$bin/go install github.com/onsi/ginkgo/ginkgo
let "result+=$?"

echo -e "\n Testing packages..."
$bin/env ginkgo -r $race $bin/..
$bin/test-unit
let "result+=$?"

echo -e "\n Vetting packages for potential issues..."
Expand Down
24 changes: 24 additions & 0 deletions bin/test-unit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

result=0

bin=$(dirname $0)

# Travis randomly kills go builds when using -race
race=$([ "$TRAVIS" != "true" ] && echo "-race")

echo -e "\n Installing ginkgo..."
$bin/go install github.com/onsi/ginkgo/ginkgo
let "result+=$?"

echo -e "\n Testing packages..."
$bin/env ginkgo -r $race $bin/..
let "result+=$?"

if [ $result -eq 0 ]; then
echo -e "\nSUITE SUCCESS"
else
echo -e "\nSUITE FAILURE"
fi

exit $result

0 comments on commit 6761061

Please sign in to comment.