2013-07-30 02:57:37 +04:00
|
|
|
#!/bin/sh
|
2013-10-17 20:02:59 +04:00
|
|
|
set -e
|
2013-08-07 04:20:58 +04:00
|
|
|
|
2013-12-05 03:23:27 +04:00
|
|
|
if [ -z "$PKG" ]; then
|
2013-12-05 09:24:04 +04:00
|
|
|
PKG="./store ./server ./server/v2/tests ./mod/lock/v2/tests"
|
2013-12-05 03:23:27 +04:00
|
|
|
fi
|
2013-11-28 03:59:05 +04:00
|
|
|
|
2013-08-07 04:20:58 +04:00
|
|
|
# Get GOPATH, etc from build
|
|
|
|
. ./build
|
|
|
|
|
2013-10-18 07:57:00 +04:00
|
|
|
# use right GOPATH
|
|
|
|
export GOPATH="${PWD}"
|
|
|
|
|
2013-10-16 23:52:35 +04:00
|
|
|
# Unit tests
|
2013-12-05 03:23:27 +04:00
|
|
|
for i in $PKG
|
2013-11-28 03:59:05 +04:00
|
|
|
do
|
2013-12-05 03:23:27 +04:00
|
|
|
go test -i $i
|
|
|
|
go test -v $i
|
2013-11-28 03:59:05 +04:00
|
|
|
done
|
2013-10-18 04:11:11 +04:00
|
|
|
|
2013-10-16 23:52:35 +04:00
|
|
|
# Functional tests
|
2013-10-18 07:57:00 +04:00
|
|
|
go test -i ./tests/functional
|
2013-10-16 23:52:35 +04:00
|
|
|
ETCD_BIN_PATH=$(pwd)/etcd go test -v ./tests/functional
|