[build] Fix exit status

Return proper exit status on failed builds

Change-Id: I2da7773e76d3261c53c12aded5633a4751a16d64
Closes-Bug: #1616432
This commit is contained in:
Dmitry Burmistrov 2016-08-24 14:57:32 +03:00
parent ea13973de1
commit 80b92b818d
1 changed files with 5 additions and 0 deletions

View File

@ -176,6 +176,7 @@ main () {
;;
esac
fi
local EXIT_STATUS=$(cat ${DEST_PATH}/exitstatus || echo 1)
# Get into buildroot
if [ "${ACTION_SHELL}" == "true" ] ; then
@ -195,6 +196,10 @@ main () {
;;
esac
fi
if [ "$EXIT_STATUS" -ne 0 ] ; then
fail_exit "BUILD FAILED: returned result is $EXIT_STATUS"
fi
}
main "$@"