Bug 1253663: ensure exit status is correct when cleaning up; r=armenzg

MozReview-Commit-ID: 3qKPQavEvCk
This commit is contained in:
Dustin J. Mitchell 2016-02-12 16:31:29 +00:00
parent 178c18a6fd
commit ab8a906d8a
2 changed files with 4 additions and 0 deletions

View File

@ -45,9 +45,11 @@ if [[ -z ${MOZHARNESS_SCRIPT} ]]; then exit 1; fi
if [[ -z ${MOZHARNESS_CONFIG} ]]; then exit 1; fi
cleanup() {
local rv=$?
if [ -n "$xvfb_pid" ]; then
kill $xvfb_pid || true
fi
exit $rv
}
trap cleanup EXIT INT

View File

@ -32,6 +32,7 @@ if [[ -z ${MOZHARNESS_CONFIG} ]]; then exit 1; fi
mkdir -p ~/artifacts/public
cleanup() {
local rv=$?
if [[ -s /home/worker/.xsession-errors ]]; then
# To share X issues
cp /home/worker/.xsession-errors ~/artifacts/public/xsession-errors.log
@ -41,6 +42,7 @@ cleanup() {
if [ -n "$xvfb_pid" ] && [ $START_VNC == false ] ; then
kill $xvfb_pid || true
fi
exit $rv
}
trap cleanup EXIT INT