test.sh 804 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh -e
  2. . ./build
  3. go test -i ./etcd
  4. go test -v ./etcd -race
  5. go test -i ./http
  6. go test -v ./http -race
  7. go test -i ./store
  8. go test -v ./store -race
  9. go test -i ./server
  10. go test -v ./server -race
  11. go test -i ./config
  12. go test -v ./config -race
  13. go test -i ./server/v1/tests
  14. go test -v ./server/v1/tests -race
  15. go test -i ./server/v2/tests
  16. go test -v ./server/v2/tests -race
  17. # Mod is deprecated temporarily.
  18. # go test -i ./mod/lock/v2/tests
  19. # go test -v ./mod/lock/v2/tests
  20. go test -i ./pkg/btrfs
  21. go test -v ./pkg/btrfs
  22. go test -i ./tests/functional
  23. ETCD_BIN_PATH=$(pwd)/bin/etcd go test -v ./tests/functional -race
  24. fmtRes=`gofmt -l $GOFMTPATH`
  25. if [ "$fmtRes" != "" ]; then
  26. echo "Failed to pass golang format checking."
  27. echo "Please gofmt modified go files, or run './build --fmt'."
  28. exit 1
  29. fi