-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
63 lines (50 loc) · 1.57 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
########################################
# Dist suite
.PHONY: reset
all: build
build:
mkdir -p build
go build -o ./build/tendermint2 ./cmd/tendermint2
install:
go install ./cmd/tendermint2
reset:
rm -rf testdir
make
clean:
rm -rf build
########################################
# Formatting, linting.
.PHONY: fmt
fmt:
go run -modfile ./misc/devdeps/go.mod mvdan.cc/gofumpt -w .
########################################
# Test suite
.PHONY: test test.go test.go1 test.go2 test.go3 test.flappy
test: test.go test.flappy
@echo "Full test suite finished."
test.flappy:
# flappy tests should work "sometimes" (at least once)
TEST_STABILITY=flappy go run -modfile ./misc/devdeps/go.mod moul.io/testman test -test.v -timeout=20m -retry=10 -run ^TestFlappy \
./pkgs/bft/consensus ./pkgs/bft/blockchain ./pkgs/bft/mempool ./pkgs/p2p ./pkgs/bft/privval
test.go: test.go1 test.go2 test.go3
test.go1:
# test most of pkgs/* except amino and bft.
# -p 1 shows test failures as they come
# maybe another way to do this?
go test `go list ./pkgs/... | grep -v pkgs/amino/ | grep -v pkgs/bft/` -v -p 1 -timeout=30m
test.go2:
# test amino.
go test ./pkgs/amino/... -v -p 1 -timeout=30m
test.go3:
# test bft.
go test ./pkgs/bft/... -v -p 1 -timeout=30m
genproto:
rm -rf proto/*
-find pkgs | grep -v "^pkgs\/amino" | grep "\.proto" | xargs rm
-find pkgs | grep -v "^pkgs\/amino" | grep "pbbindings" | xargs rm
-find pkgs | grep -v "^pkgs\/amino" | grep "pb.go" | xargs rm
@rm gno.proto || true
@rm pbbindings.go || true
@rm gno.pb.go || true
go run cmd/genproto/genproto.go
make fmt