Reorganize testing for developer efficiency

This commit is contained in:
James Shubin
2015-10-12 19:26:58 -04:00
parent 4f6605b3d1
commit 0ea6f30ef2
2 changed files with 11 additions and 6 deletions

View File

@@ -31,12 +31,6 @@ clean:
test:
./test.sh
./test/test-gofmt.sh
./test/test-yamlfmt.sh
go test
#go test ./pgraph
go test -race
#go test -race ./pgraph
format:
find -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -exec gofmt -w {} \;

11
test.sh
View File

@@ -9,3 +9,14 @@ git diff-tree --check $(git hash-object -t tree /dev/null) HEAD
# ensure entries to authors file are sorted
start=$(($(grep -n '^[[:space:]]*$' AUTHORS | awk -F ':' '{print $1}' | head -1) + 1))
diff <(tail -n +$start AUTHORS | sort) <(tail -n +$start AUTHORS)
./test/test-gofmt.sh
./test/test-yamlfmt.sh
go test
#go test ./pgraph
# do these longer tests only when running on ci
if env | grep -q '^TRAVIS=true$'; then
go test -race
#go test -race ./pgraph
fi