Move test files to testdata dir

This commit is contained in:
Adrian Gallagher
2017-08-22 10:26:13 +10:00
parent 57f49d5b35
commit 39548b23b9
4 changed files with 14 additions and 4 deletions

5
.gitignore vendored
View File

@@ -2,4 +2,7 @@ config.json
config.dat
node_modules
lib
.vscode
.vscode
testdata/dump
testdata/writefiletest

View File

@@ -8,7 +8,7 @@ before_install:
- go get -t -v ./...
script:
- ./test.sh
- ./testdata/test.sh
install:
- go get github.com/gorilla/websocket

View File

@@ -1,12 +1,19 @@
#!/usr/bin/env bash
set -e
echo "" > coverage.txt
if [ -n "$TRAVIS_BUILD_DIR" ]; then
cd $TRAVIS_BUILD_DIR
else
cd $GOPATH/src/github.com/thrasher-/gocryptotrader
fi
echo "" > testdata/coverage.txt
for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic -cover $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
cat profile.out >> testdata/coverage.txt
rm profile.out
fi
done