Skip to content

Commit 79b9c73

Browse files
committed
Test Script Polishing
This change polishes up the test script a bit. It starts by getting the godep path using the godep command itself. Beyond that, there are some changes to quoting. Finally, the Travis configuration was changed to use the runTests script.
1 parent 716151f commit 79b9c73

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
language: go
33
go:
44
- 1.4.2
5+
script: scripts/runTests
56
sudo: false
67
notifications:
78
slack:

scripts/runTests

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function status_on_exit {
1313
}
1414

1515
function run-in-godep {
16-
local goDepsPath=$(cd $(dirname $0)/.. && pwd)/Godeps/_workspace
17-
mkdir -p $goDepsPath/bin
18-
GOPATH=$goDepsPath:$GOPATH PATH=$goDepsPath/bin:$PATH $@
16+
local goDepsPath=$(godep path)
17+
mkdir -p "${goDepsPath}/bin"
18+
GOPATH="${goDepsPath}:${GOPATH}" PATH="${goDepsPath}/bin:${PATH}" "$@"
1919
}
2020

2121
# Install ginkgo (from Godeps) into Godeps workspace
@@ -25,6 +25,6 @@ run-in-godep go install -v github.com/onsi/ginkgo/ginkgo
2525
trap status_on_exit EXIT
2626

2727
# Announce test run
28-
echo; echo ginkgo $ginkgoTags "$@"; echo
28+
echo; echo ginkgo ${ginkgoTags} "$@"; echo
2929
# Run all tests under Godeps environment
30-
run-in-godep ginkgo $ginkgoTags "$@"
30+
run-in-godep ginkgo ${ginkgoTags} "$@"

0 commit comments

Comments
 (0)