From 4167ffe11a48cbe8f808b3d7e44488299eda111d Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 25 Oct 2016 14:00:27 -0700 Subject: [PATCH] Capture exit code of nunit to avoid using failed tests as exit code --- test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test.sh b/test.sh index 4a2f69e50..77b58f2e5 100644 --- a/test.sh +++ b/test.sh @@ -42,3 +42,11 @@ for i in `find $TEST_DIR -name "$TEST_PATTERN"`; done $NUNIT_COMMAND --where "$WHERE" $NUNIT_PARAMS $ASSEMBLIES; +EXIT_CODE=$? + +if [ "$EXIT_CODE" -ge 0 ]; then + echo "Failed tests: $EXIT_CODE" + exit 0 +else + exit $EXIT_CODE +fi