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.

74 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 test_cover
  33. make test_apps
  34. make test_abci_apps
  35. make test_abci_cli
  36. make test_libs
  37. .PHONY: test_integrations
  38. test_release:
  39. @go test -tags release $(PACKAGES)
  40. .PHONY: test_release
  41. test100:
  42. @for i in {1..100}; do make test; done
  43. .PHONY: test100
  44. vagrant_test:
  45. vagrant up
  46. vagrant ssh -c 'make test_integrations'
  47. .PHONY: vagrant_test
  48. ### go tests
  49. test:
  50. @echo "--> Running go test"
  51. @go test -p 1 $(PACKAGES) -tags deadlock
  52. .PHONY: test
  53. test_race:
  54. @echo "--> Running go test --race"
  55. @go test -p 1 -v -race $(PACKAGES)
  56. .PHONY: test_race
  57. test_deadlock:
  58. @echo "--> Running go test --deadlock"
  59. @go test -p 1 -v $(PACKAGES) -tags deadlock
  60. .PHONY: test_race