From 6337e4a1ec545f354d97b2734bccc06c687b1754 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Mon, 23 Oct 2017 16:07:51 -0700 Subject: [PATCH] semaphore: add test scripts --- .semaphore.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 .semaphore.sh diff --git a/.semaphore.sh b/.semaphore.sh new file mode 100755 index 000000000..0e816f91d --- /dev/null +++ b/.semaphore.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +TEST_SUFFIX=$(date +%s | base64 | head -c 15) + +TEST_OPTS="RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional'" +if [ "$TEST_ARCH" == "386" ]; then + TEST_OPTS="GOARCH=386 PASSES='build unit integration_e2e'" +fi + +docker run \ + --rm \ + --volume=`pwd`:/go/src/github.com/coreos/etcd \ + gcr.io/etcd-development/etcd-test:go1.9.1 \ + /bin/bash -c "${TEST_OPTS} ./test 2>&1 | tee test-${TEST_SUFFIX}.log" + +! grep FAIL -A10 -B50 test-${TEST_SUFFIX}.log