semaphore.test.bash 611 B

123456789101112131415161718192021
  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. TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.3.3"
  8. if [ "$TEST_ARCH" == "386" ]; then
  9. TEST_OPTS="GOARCH=386 PASSES='build e2e'"
  10. fi
  11. docker run \
  12. --rm \
  13. --volume=`pwd`:/go/src/github.com/coreos/etcd \
  14. gcr.io/etcd-development/etcd-test:go1.10.1 \
  15. /bin/bash -c "${TEST_OPTS} ./test 2>&1 | tee test-${TEST_SUFFIX}.log"
  16. ! egrep "(--- FAIL:|panic: test timed out|appears to have leaked)" -B50 -A10 test-${TEST_SUFFIX}.log