github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/tests.mk (about) 1 #!/usr/bin/make -f 2 3 ######################################## 4 ### Testing 5 6 BINDIR ?= $(GOPATH)/bin 7 8 ## required to be run first by most tests 9 build_docker_test_image: 10 docker build -t tester -f ./test/docker/Dockerfile . 11 .PHONY: build_docker_test_image 12 13 ### coverage, app, persistence, and libs tests 14 test_cover: 15 # run the go unit tests with coverage 16 bash test/test_cover.sh 17 .PHONY: test_cover 18 19 test_apps: 20 # run the app tests using bash 21 # requires `abci-cli` and `tendermint` binaries installed 22 bash test/app/test.sh 23 .PHONY: test_apps 24 25 test_abci_apps: 26 bash abci/tests/test_app/test.sh 27 .PHONY: test_abci_apps 28 29 test_abci_cli: 30 # test the cli against the examples in the tutorial at: 31 # ./docs/abci-cli.md 32 # if test fails, update the docs ^ 33 @ bash abci/tests/test_cli/test.sh 34 .PHONY: test_abci_cli 35 36 test_persistence: 37 # run the persistence tests using bash 38 # requires `abci-cli` installed 39 docker run --name run_persistence -t tester bash test/persist/test_failure_indices.sh 40 41 # TODO undockerize 42 # bash test/persist/test_failure_indices.sh 43 .PHONY: test_persistence 44 45 test_p2p: 46 docker rm -f rsyslog || true 47 rm -rf test/logs && mkdir -p test/logs 48 docker run -d -v "$(CURDIR)/test/logs:/var/log/" -p 127.0.0.1:5514:514/udp --name rsyslog voxxit/rsyslog 49 # requires 'tester' the image from above 50 bash test/p2p/test.sh tester 51 # the `docker cp` takes a really long time; uncomment for debugging 52 # 53 # mkdir -p test/p2p/logs && docker cp rsyslog:/var/log test/p2p/logs 54 .PHONY: test_p2p 55 56 test_p2p_ipv6: 57 # IPv6 tests require Docker daemon with IPv6 enabled, e.g. in daemon.json: 58 # 59 # { 60 # "ipv6": true, 61 # "fixed-cidr-v6": "2001:db8:1::/64" 62 # } 63 # 64 # Docker for Mac can set this via Preferences -> Docker Engine. 65 docker rm -f rsyslog || true 66 rm -rf test/logs && mkdir -p test/logs 67 docker run -d -v "$(CURDIR)/test/logs:/var/log/" -p 127.0.0.1:5514:514/udp --name rsyslog voxxit/rsyslog 68 # requires 'tester' the image from above 69 bash test/p2p/test.sh tester 6 70 # the `docker cp` takes a really long time; uncomment for debugging 71 # 72 # mkdir -p test/p2p/logs && docker cp rsyslog:/var/log test/p2p/logs 73 .PHONY: test_p2p_ipv6 74 75 test_integrations: 76 make build_docker_test_image 77 make tools 78 make install 79 make test_cover 80 make test_apps 81 make test_abci_apps 82 make test_abci_cli 83 make test_libs 84 make test_persistence 85 make test_p2p 86 # Disabled by default since it requires Docker daemon with IPv6 enabled 87 #make test_p2p_ipv6 88 .PHONY: test_integrations 89 90 test_release: 91 @go test -tags release $(PACKAGES) 92 .PHONY: test_release 93 94 test100: 95 @for i in {1..100}; do make test; done 96 .PHONY: test100 97 98 vagrant_test: 99 vagrant up 100 vagrant ssh -c 'make test_integrations' 101 .PHONY: vagrant_test 102 103 ### go tests 104 test: 105 @echo "--> Running go test" 106 @go test -p 1 $(PACKAGES) -tags deadlock 107 .PHONY: test 108 109 test_race: 110 @echo "--> Running go test --race" 111 @go test -p 1 -v -race $(PACKAGES) 112 .PHONY: test_race 113 114 test_deadlock: 115 @echo "--> Running go test --deadlock" 116 @go test -p 1 -v $(PACKAGES) -tags deadlock 117 .PHONY: test_race