Reorganize testing for developer efficiency
This commit is contained in:
6
Makefile
6
Makefile
@@ -31,12 +31,6 @@ clean:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
./test.sh
|
./test.sh
|
||||||
./test/test-gofmt.sh
|
|
||||||
./test/test-yamlfmt.sh
|
|
||||||
go test
|
|
||||||
#go test ./pgraph
|
|
||||||
go test -race
|
|
||||||
#go test -race ./pgraph
|
|
||||||
|
|
||||||
format:
|
format:
|
||||||
find -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -exec gofmt -w {} \;
|
find -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -exec gofmt -w {} \;
|
||||||
|
|||||||
11
test.sh
11
test.sh
@@ -9,3 +9,14 @@ git diff-tree --check $(git hash-object -t tree /dev/null) HEAD
|
|||||||
# ensure entries to authors file are sorted
|
# ensure entries to authors file are sorted
|
||||||
start=$(($(grep -n '^[[:space:]]*$' AUTHORS | awk -F ':' '{print $1}' | head -1) + 1))
|
start=$(($(grep -n '^[[:space:]]*$' AUTHORS | awk -F ':' '{print $1}' | head -1) + 1))
|
||||||
diff <(tail -n +$start AUTHORS | sort) <(tail -n +$start AUTHORS)
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user