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.

75 lines
1.5 KiB

  1. #!/usr/bin/make -f
  2. ########################################
  3. ### Testing
  4. BINDIR ?= $(GOPATH)/bin
  5. ## required to be run first by most tests
  6. build_docker_test_image:
  7. docker build -t tester -f ./test/docker/Dockerfile .
  8. .PHONY: build_docker_test_image
  9. ### coverage, app, persistence, and libs tests
  10. test_cover:
  11. # run the go unit tests with coverage
  12. bash test/test_cover.sh
  13. .PHONY: test_cover
  14. test_apps:
  15. # run the app tests using bash
  16. # requires `abci-cli` and `tendermint` binaries installed
  17. bash test/app/test.sh
  18. .PHONY: test_apps
  19. test_abci_apps:
  20. bash abci/tests/test_app/test.sh
  21. .PHONY: test_abci_apps
  22. test_abci_cli:
  23. # test the cli against the examples in the tutorial at:
  24. # ./docs/abci-cli.md
  25. # if test fails, update the docs ^
  26. @ bash abci/tests/test_cli/test.sh
  27. .PHONY: test_abci_cli
  28. test_integrations:
  29. make build_docker_test_image
  30. make tools
  31. make install
  32. make install_abci
  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. vagrant_test:
  46. vagrant up
  47. vagrant ssh -c 'make test_integrations'
  48. .PHONY: vagrant_test
  49. ### go tests
  50. test:
  51. @echo "--> Running go test"
  52. @go test -p 1 $(PACKAGES) -tags deadlock
  53. .PHONY: test
  54. test_race:
  55. @echo "--> Running go test --race"
  56. @go test -p 1 -v -race $(PACKAGES)
  57. .PHONY: test_race
  58. test_deadlock:
  59. @echo "--> Running go test --deadlock"
  60. @go test -p 1 -v $(PACKAGES) -tags deadlock
  61. .PHONY: test_race