Skip to content

Commit

Permalink
[FAB-4099] Skip directories in unit tests search
Browse files Browse the repository at this point in the history
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 <binhn@us.ibm.com>
  • Loading branch information
binhn committed May 22, 2017
1 parent 5759ee4 commit a3f159e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions unit-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,4 +37,3 @@ echo "DONE!"

echo "Running tests..."
gocov test -ldflags "$GO_LDFLAGS" $PKGS -p 1 -timeout=20m | gocov-xml > report.xml

0 comments on commit a3f159e

Please sign in to comment.