Skip to content

Commit

Permalink
Add test script
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Kalinin and Pieter Noordhuis committed Jan 30, 2013
1 parent 9d642e4 commit e3f4040
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ language: common

script:
- gem install nats
- bin/go test router -gocheck.v=true
- bin/test
27 changes: 27 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -e

function packages() {
find src -name '*_test.go' | xargs -n1 dirname | sort | uniq | cut -d/ -f2-
}

echo --- Installing
for p in $(packages)
do
echo $p
bin/go test -i $p
done

echo --- Testing
for p in $(packages)
do
echo $p

if grep -q launchpad.net/gocheck src/$p/*.go
then
bin/go test $p -test.v=true -gocheck.v=true
else
bin/go test $p -test.v=true
fi
done

0 comments on commit e3f4040

Please sign in to comment.