Skip to content

Commit

Permalink
build.sh be sure to status correctly the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aviviadi committed Feb 4, 2016
1 parent fc038fa commit 79acd31
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,18 @@ then
status=$?
fi
popd
finline=`cat ${OUT_FILE}.test | egrep "Total.*Errors.*Failed.*Skipped" | wc -l | cut -f1`
if [ ${finline} == 0 ] # tests can return 0 after specific errors
then
status=1
fi
if [ ${status} -ne 0 ]
then
if [ ${OP_REPORT} == 1 ]
then
echo "FAILED !!" >> ${REPORT_FILE}
echo "`date +"%d/%m/%Y_%H:%M:%S"` ERRORS:" >> ${REPORT_FILE}
cat ${OUT_FILE}.test | egrep "Total.*Errors.*Failed.*Skipped" >> ${REPORT_FILE}
grep '\[FAIL\]' ${OUT_FILE}.test >> ${REPORT_FILE}
echo "`date +"%d/%m/%Y_%H:%M:%S"` Saving output at ${OUT_FILE}.`date +"%d%m%Y_%H%M%S"`"
cp ${OUT_FILE}.test ${OUT_FILE}.`date +"%d%m%Y_%H%M%S"`
Expand All @@ -433,6 +439,8 @@ then
if [ ${OP_REPORT} == 1 ]
then
echo "Successs." >> ${REPORT_FILE}
cat ${OUT_FILE}.test | egrep "Total.*Errors.*Failed.*Skipped" >> ${REPORT_FILE}

fi
fi
done
Expand Down

0 comments on commit 79acd31

Please sign in to comment.