Skip to content

Commit

Permalink
Return correct exit code from test script
Browse files Browse the repository at this point in the history
Change-Id: Ib0d5f0374b5bcf72aef3a23e467d25503259463e
Signed-off-by: Divyank Katira <Divyank.Katira@securekey.com>
  • Loading branch information
d1vyank committed May 3, 2017
1 parent 44e57b3 commit 78b6da1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/scripts/integration.sh
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -exu

# Packages to exclude
PKGS=`go list github.com/hyperledger/fabric-sdk-go/test/... 2> /dev/null | \
Expand All @@ -11,5 +11,13 @@ echo "Running integration tests..."
cd ../../
gocov test -ldflags "$GO_LDFLAGS" $PKGS -p 1 -timeout=10m | gocov-xml > integration-report.xml

echo "Cleaning up..."
cd ./test/fixtures && docker-compose down
if [ $? -eq 0 ]
then
echo "Integration tests passed. Cleaning up..."
cd ./test/fixtures && docker-compose down
exit 0
else
echo "Integration tests failed. Cleaning up..."
cd ./test/fixtures && docker-compose down
exit 1
fi

0 comments on commit 78b6da1

Please sign in to comment.