mirror of
https://github.com/tendermint/tendermint.git
synced 2026-05-31 19:36:20 +00:00
tests: less bash
This commit is contained in:
5
Makefile
5
Makefile
@@ -82,9 +82,14 @@ test_race:
|
||||
@echo "==> Running go test --race"
|
||||
@go test -v -race $(PACKAGES)
|
||||
|
||||
test_cover:
|
||||
@ bash tests/test_cover.sh
|
||||
|
||||
test_integrations:
|
||||
@bash test.sh
|
||||
|
||||
fmt:
|
||||
@ go fmt ./...
|
||||
|
||||
########################################
|
||||
### Formatting, linting, and vetting
|
||||
|
||||
19
test.sh
19
test.sh
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
echo "" > coverage.txt
|
||||
|
||||
echo "==> Running unit tests"
|
||||
for d in $(go list ./... | grep -v vendor); do
|
||||
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
||||
if [ -f profile.out ]; then
|
||||
cat profile.out >> coverage.txt
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
||||
|
||||
echo "==> Running integration tests (./tests)"
|
||||
find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
|
||||
# tests/test.sh requires that we run the installed cmds, must not be out of date
|
||||
make install
|
||||
bash tests/test.sh
|
||||
|
||||
13
tests/test_cover.sh
Normal file
13
tests/test_cover.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
echo "" > coverage.txt
|
||||
|
||||
echo "==> Running unit tests"
|
||||
for d in $(go list ./... | grep -v vendor); do
|
||||
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
||||
if [ -f profile.out ]; then
|
||||
cat profile.out >> coverage.txt
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user