-
Notifications
You must be signed in to change notification settings - Fork 367
Expand file tree
/
Copy pathtests.mk
More file actions
87 lines (73 loc) · 2.02 KB
/
tests.mk
File metadata and controls
87 lines (73 loc) · 2.02 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/make -f
########################################
### Testing
BINDIR ?= $(GOPATH)/bin
## required to be run first by most tests
#? build_docker_test_image: Build Docker test image
build_docker_test_image:
docker build -t tester -f ./test/docker/Dockerfile .
.PHONY: build_docker_test_image
### coverage, app, persistence, and libs tests
#? test_cover: Run go unit tests with coverage
test_cover:
# run the go unit tests with coverage
bash test/test_cover.sh
.PHONY: test_cover
#? test_apps: Run app tests using bash
test_apps:
# run the app tests using bash
# requires `abci-cli` and `cometbft` binaries installed
bash test/app/test.sh
.PHONY: test_apps
#? test_abci_apps: Run ABCI app tests
test_abci_apps:
bash abci/tests/test_app/test.sh
.PHONY: test_abci_apps
#? test_abci_cli: Run ABCI CLI tests
test_abci_cli:
# test the cli against the examples in the tutorial at:
# ./docs/abci-cli.md
# if test fails, update the docs ^
@ bash abci/tests/test_cli/test.sh
.PHONY: test_abci_cli
#? test_integrations: Run all integration tests
test_integrations:
make build_docker_test_image
make tools
make install
make install_abci
make test_cover
make test_apps
make test_abci_apps
make test_abci_cli
make test_libs
.PHONY: test_integrations
#? test_release: Run release tests
test_release:
@go test -tags release $(PACKAGES)
.PHONY: test_release
#? test100: Run tests 100 times
test100:
@for i in {1..100}; do make test; done
.PHONY: test100
#? vagrant_test: Run integration tests in Vagrant
vagrant_test:
vagrant up
vagrant ssh -c 'make test_integrations'
.PHONY: vagrant_test
### go tests
#? test: Run go tests
test:
@echo "--> Running go test"
@go test -p 1 $(PACKAGES) -tags deadlock
.PHONY: test
#? test_race: Run go tests with race detector
test_race:
@echo "--> Running go test --race"
@go test -p 1 -v -race $(PACKAGES)
.PHONY: test_race
#? test_deadlock: Run go tests with deadlock detector
test_deadlock:
@echo "--> Running go test --deadlock"
@go test -p 1 -v $(PACKAGES) -tags deadlock
.PHONY: test_deadlock