From 14a047c2f332a2d9d053a443a6258891ac750900 Mon Sep 17 00:00:00 2001 From: Wyatt Date: Thu, 20 Apr 2017 12:38:40 -0700 Subject: [PATCH] Build fully automated, including aggregation --- Makefile | 1 + test/sharness/aggregate-results.sh | 0 test/sharness/run-sharness-tests.sh | 8 ++++++++ test/sharness/t0020-service-startup-init.sh | 4 ++-- 4 files changed, 11 insertions(+), 2 deletions(-) mode change 100644 => 100755 test/sharness/aggregate-results.sh diff --git a/Makefile b/Makefile index bc1bf34f..3f8fb6e0 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,7 @@ test: deps go test -tags silent -v ./... test_sharness: sharness_deps @sh test/sharness/run-sharness-tests.sh + @rm -rf test/sharness/trash\ directory* sharness_deps: deps @./test/sharness/lib/install-sharness.sh diff --git a/test/sharness/aggregate-results.sh b/test/sharness/aggregate-results.sh old mode 100644 new mode 100755 diff --git a/test/sharness/run-sharness-tests.sh b/test/sharness/run-sharness-tests.sh index 82847615..f2d1cd5b 100755 --- a/test/sharness/run-sharness-tests.sh +++ b/test/sharness/run-sharness-tests.sh @@ -1,9 +1,17 @@ #!/bin/sh # # MIT License + +# Run tests cd "$(dirname "$0")" for i in `ls t*.sh | sort`; do echo "*** $i ***" ./$i done + +# Aggregate Results +echo "We are aggregating" +for f in test-results/*.counts; do + echo "$f"; +done | bash aggregate-results.sh diff --git a/test/sharness/t0020-service-startup-init.sh b/test/sharness/t0020-service-startup-init.sh index 6bdd6fbd..f1bba86e 100755 --- a/test/sharness/t0020-service-startup-init.sh +++ b/test/sharness/t0020-service-startup-init.sh @@ -15,7 +15,7 @@ test_expect_success "launch ipfs daemon" ' mkdir -p ../.test_ipfs && IPFS_PATH="../.test_ipfs" eval '"'"'ipfs init'"'"' && IPFS_PATH="../.test_ipfs" eval '"'"'ipfs daemon & echo $! >../dPID.txt'"'"' && - sleep 3 + sleep 2 ' test_expect_success "test config folder exists" ' @@ -31,7 +31,7 @@ test_expect_success "init cluster-service" ' test_expect_success "run cluster-service" ' ipfs-cluster-service --config ../.test_config 2>service_start.txt & echo $!>../sPID.txt && - sleep 3 && + sleep 2 && egrep -i "ready" service_start.txt >/dev/null && rm service_start.txt '