tile38/test.sh

21 lines
306 B
Bash
Raw Normal View History

2016-03-05 02:08:16 +03:00
#!/bin/bash
set -e
cd $(dirname "${BASH_SOURCE[0]}")
WD=$(pwd)
if [ ! -f "tile38-server" ];then
2016-03-05 02:33:11 +03:00
./build.sh
2016-03-05 02:08:16 +03:00
fi
2016-03-05 02:38:23 +03:00
TMP="$(mktemp -d -t data-test.XXXX)"
2016-03-05 02:08:16 +03:00
./tile38-server -p 9876 -d "$TMP" -q &
PID=$!
function end {
rm -rf "$TMP"
kill $PID &
}
trap end EXIT
go test $(go list ./... | grep -v /vendor/)