From 774f6652df1045c1ffd5c42f56c6cc05833a8000 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Mon, 9 Apr 2018 10:48:54 -0700 Subject: [PATCH] semaphore.sh: move to "tests/semaphore.test.bash" Signed-off-by: Gyuho Lee --- .semaphore.sh | 16 ---------------- tests/semaphore.test.bash | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 16 deletions(-) delete mode 100755 .semaphore.sh create mode 100755 tests/semaphore.test.bash diff --git a/.semaphore.sh b/.semaphore.sh deleted file mode 100755 index 887a0cc56..000000000 --- a/.semaphore.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -TEST_SUFFIX=$(date +%s | base64 | head -c 15) - -TEST_OPTS="PASSES='build unit release integration_e2e functional' MANUAL_VER=v3.3.3" -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.10.1 \ - /bin/bash -c "${TEST_OPTS} ./test 2>&1 | tee test-${TEST_SUFFIX}.log" - -! egrep "(--- FAIL:|panic: test timed out|appears to have leaked)" -B50 -A10 test-${TEST_SUFFIX}.log diff --git a/tests/semaphore.test.bash b/tests/semaphore.test.bash new file mode 100755 index 000000000..866be7b1c --- /dev/null +++ b/tests/semaphore.test.bash @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +if ! [[ "$0" =~ "tests/semaphore.test.bash" ]]; then + echo "must be run from repository root" + exit 255 +fi + +TEST_SUFFIX=$(date +%s | base64 | head -c 15) + +TEST_OPTS="PASSES='build unit release integration_e2e functional' MANUAL_VER=v3.3.3" +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.10.1 \ + /bin/bash -c "${TEST_OPTS} ./test 2>&1 | tee test-${TEST_SUFFIX}.log" + +! egrep "(--- FAIL:|panic: test timed out|appears to have leaked)" -B50 -A10 test-${TEST_SUFFIX}.log