diff options
author | =Corey Hulen <corey@hulen.com> | 2015-11-23 15:53:48 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-11-23 15:53:48 -0800 |
commit | 4f4cd5e63573da4d6edcc7d4213afaca67c19f88 (patch) | |
tree | cefbc7af53629d97644ca2f6b2369e9d879f0101 /Godeps/_workspace/src/github.com/go-gorp/gorp/test_all.sh | |
parent | f8a3c9a14edca6df0647d89cf225f2470cbe025c (diff) | |
download | chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.tar.gz chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.tar.bz2 chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.zip |
upgrading libs
Diffstat (limited to 'Godeps/_workspace/src/github.com/go-gorp/gorp/test_all.sh')
-rw-r--r-- | Godeps/_workspace/src/github.com/go-gorp/gorp/test_all.sh | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/Godeps/_workspace/src/github.com/go-gorp/gorp/test_all.sh b/Godeps/_workspace/src/github.com/go-gorp/gorp/test_all.sh index f870b39a3..f2d16961a 100644 --- a/Godeps/_workspace/src/github.com/go-gorp/gorp/test_all.sh +++ b/Godeps/_workspace/src/github.com/go-gorp/gorp/test_all.sh @@ -1,22 +1,38 @@ -#!/bin/sh +#!/bin/bash -e # on macs, you may need to: # export GOBUILDFLAG=-ldflags -linkmode=external -set -e +coveralls_testflags="-v -covermode=count -coverprofile=coverage.out" +echo "Testing against mysql" export GORP_TEST_DSN=gorptest/gorptest/gorptest export GORP_TEST_DIALECT=mysql -go test $GOBUILDFLAG . +go test $coveralls_testflags $GOBUILDFLAG $@ . +echo "Testing against gomysql" export GORP_TEST_DSN=gorptest:gorptest@/gorptest export GORP_TEST_DIALECT=gomysql -go test $GOBUILDFLAG . +go test $coveralls_testflags $GOBUILDFLAG $@ . +echo "Testing against postgres" export GORP_TEST_DSN="user=gorptest password=gorptest dbname=gorptest sslmode=disable" export GORP_TEST_DIALECT=postgres -go test $GOBUILDFLAG . +go test $coveralls_testflags $GOBUILDFLAG $@ . +echo "Testing against sqlite" export GORP_TEST_DSN=/tmp/gorptest.bin export GORP_TEST_DIALECT=sqlite -go test $GOBUILDFLAG . +go test $coveralls_testflags $GOBUILDFLAG $@ . +rm -f /tmp/gorptest.bin + +case $(go version) in + *go1.4*) + if [ "$(type -p goveralls)" != "" ]; then + goveralls -covermode=count -coverprofile=coverage.out -service=travis-ci + elif [ -x $HOME/gopath/bin/goveralls ]; then + $HOME/gopath/bin/goveralls -covermode=count -coverprofile=coverage.out -service=travis-ci + fi + ;; + *) ;; +esac |