semaphore.test.bash 698 B

12345678910111213141516171819202122232425
  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. TEST_SUFFIX=$(date +%s | base64 | head -c 15)
  7. if [ -z "${TEST_OPTS}" ]; then
  8. TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.3.7"
  9. fi
  10. if [ "${TEST_ARCH}" == "386" ]; then
  11. TEST_OPTS="GOARCH=386 PASSES='build e2e'"
  12. fi
  13. echo "Running tests with" ${TEST_OPTS}
  14. docker run \
  15. --rm \
  16. --volume=`pwd`:/go/src/github.com/coreos/etcd \
  17. gcr.io/etcd-development/etcd-test:go1.10.3 \
  18. /bin/bash -c "${TEST_OPTS} ./test 2>&1 | tee test-${TEST_SUFFIX}.log"
  19. ! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test-${TEST_SUFFIX}.log