From a3f159edc02772d3b3f1d73b15263637c6a9700d Mon Sep 17 00:00:00 2001 From: "Binh Q. Nguyen" Date: Mon, 22 May 2017 17:36:45 -0400 Subject: [PATCH] [FAB-4099] Skip directories in unit tests search Some directories contain code for unit-tests support or samples which should be excluded from unit-test search. Change-Id: Ia4ee2e70a899af9583cd22a104247bde4d1bcd91 Signed-off-by: Binh Q. Nguyen --- unit-test/run.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/unit-test/run.sh b/unit-test/run.sh index c1f2e345c66..d25960553e4 100755 --- a/unit-test/run.sh +++ b/unit-test/run.sh @@ -11,15 +11,21 @@ echo -n "Obtaining list of tests to run for the following packages: ${TEST_PKGS} PKGS=`go list ${TEST_PKGS} 2> /dev/null | \ grep -v /vendor/ | \ grep -v /build/ | \ + grep -v /bccsp/mocks | \ grep -v /bddtests | \ grep -v /orderer/mocks | \ + grep -v /orderer/sample_clients | \ grep -v /common/mocks | \ + grep -v /common/ledger/testutil | \ grep -v /core/mocks | \ + grep -v /core/testutil | \ + grep -v /core/ledger/testutil | \ + grep -v /core/ledger/kvledger/example | \ + grep -v /core/ledger/kvledger/marble_example | \ + grep -v /core/deliverservice/mocks | \ + grep -v /core/scc/samplesyscc | \ grep -v /test | \ - grep -v /examples/chaincode/chaintool/ | \ - grep -v /examples/chaincode/go/asset_management | \ - grep -v /examples/chaincode/go/utxo | \ - grep -v /examples/chaincode/go/rbac_tcerts_no_attrs` + grep -v /examples` if [ x$ARCH == xppc64le -o x$ARCH == xs390x ] then @@ -31,4 +37,3 @@ echo "DONE!" echo "Running tests..." gocov test -ldflags "$GO_LDFLAGS" $PKGS -p 1 -timeout=20m | gocov-xml > report.xml -