You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.3 KiB

  1. #!/usr/bin/make -f
  2. ########################################
  3. ### Testing
  4. PACKAGES=$(shell go list ./...)
  5. BINDIR ?= $(GOPATH)/bin
  6. ## required to be run first by most tests
  7. build_docker_test_image:
  8. docker build -t tester -f ./test/docker/Dockerfile .
  9. .PHONY: build_docker_test_image
  10. ### coverage, app, persistence, and libs tests
  11. test_cover:
  12. # run the go unit tests with coverage
  13. bash test/test_cover.sh
  14. .PHONY: test_cover
  15. test_apps:
  16. # run the app tests using bash
  17. # requires `abci-cli` and `tendermint` binaries installed
  18. bash test/app/test.sh
  19. .PHONY: test_apps
  20. test_abci_apps:
  21. bash abci/tests/test_app/test.sh
  22. .PHONY: test_abci_apps
  23. test_abci_cli:
  24. # test the cli against the examples in the tutorial at:
  25. # ./docs/abci-cli.md
  26. # if test fails, update the docs ^
  27. @ bash abci/tests/test_cli/test.sh
  28. .PHONY: test_abci_cli
  29. test_integrations:
  30. make build_docker_test_image
  31. make tools
  32. make install
  33. make test_cover
  34. make test_apps
  35. make test_abci_apps
  36. make test_abci_cli
  37. make test_libs
  38. .PHONY: test_integrations
  39. test_release:
  40. @go test -tags release $(PACKAGES)
  41. .PHONY: test_release
  42. test100:
  43. @for i in {1..100}; do make test; done
  44. .PHONY: test100
  45. ### go tests
  46. test:
  47. @echo "--> Running go test"
  48. @go test -p 1 $(PACKAGES) -tags deadlock
  49. .PHONY: test
  50. test_race:
  51. @echo "--> Running go test --race"
  52. @go test -p 1 -v -race $(PACKAGES)
  53. .PHONY: test_race