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.

50 lines
1.0 KiB

8 years ago
  1. #! /bin/bash
  2. set -e
  3. # set glide.lock path
  4. if [[ "$GLIDE" == "" ]]; then
  5. GLIDE=$GOPATH/src/github.com/tendermint/tendermint/glide.lock
  6. fi
  7. # get vendored commit for given lib
  8. ####################
  9. # libs we depend on
  10. ####################
  11. # some libs are tested with go, others with make
  12. # TODO: should be all make (post repo merge)
  13. LIBS_GO_TEST=(tmlibs/clist tmlibs/common go-config go-crypto tmlibs/db tmlibs/events go-merkle tendermint/p2p)
  14. LIBS_MAKE_TEST=(tendermint/rpc go-wire abci)
  15. for lib in "${LIBS_GO_TEST[@]}"; do
  16. # checkout vendored version of lib
  17. bash scripts/glide/checkout.sh "$GLIDE" "$lib"
  18. echo "Testing $lib ..."
  19. go test -v --race "github.com/tendermint/$lib/..."
  20. if [[ "$?" != 0 ]]; then
  21. echo "FAIL"
  22. exit 1
  23. fi
  24. done
  25. DIR=$(pwd)
  26. for lib in "${LIBS_MAKE_TEST[@]}"; do
  27. # checkout vendored version of lib
  28. bash scripts/glide/checkout.sh "$GLIDE" "$lib"
  29. echo "Testing $lib ..."
  30. cd "$GOPATH/src/github.com/tendermint/$lib"
  31. make test
  32. if [[ "$?" != 0 ]]; then
  33. echo "FAIL"
  34. exit 1
  35. fi
  36. cd "$DIR"
  37. done
  38. echo ""
  39. echo "PASS"