semaphore.test.bash 895 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env bash
  2. if ! [[ "$0" =~ "tests/semaphore.test.bash" ]]; then
  3. echo "must be run from repository root"
  4. exit 255
  5. fi
  6. <<COMMENT
  7. # amd64-e2e
  8. bash tests/semaphore.test.bash
  9. # 386-e2e
  10. TEST_ARCH=386 bash tests/semaphore.test.bash
  11. # grpc-proxy
  12. TEST_OPTS="PASSES='build grpcproxy'" bash tests/semaphore.test.bash
  13. # coverage
  14. TEST_OPTS="coverage" bash tests/semaphore.test.bash
  15. COMMENT
  16. if [ -z "${TEST_OPTS}" ]; then
  17. TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.3.7"
  18. fi
  19. if [ "${TEST_ARCH}" == "386" ]; then
  20. TEST_OPTS="GOARCH=386 PASSES='build e2e'"
  21. fi
  22. echo "Running tests with" ${TEST_OPTS}
  23. if [ "${TEST_OPTS}" == "PASSES='build grpcproxy'" ]; then
  24. echo "Skip proxy tests for this branch!"
  25. exit 0
  26. elif [ "${TEST_OPTS}" == "coverage" ]; then
  27. echo "Skip coverage tests for this branch!"
  28. exit 0
  29. else
  30. sudo HOST_TMP_DIR=/tmp TEST_OPTS="${TEST_OPTS}" make docker-test
  31. fi