Bug 1231320: ensure exit status is correct when cleaning up; r?armenzg draft
authorDustin J. Mitchell <dustin@mozilla.com>
Fri, 12 Feb 2016 16:31:29 +0000
changeset 331196 7b9a31723858f9bc051b515688dabc4afd10a0a8
parent 331195 bdb1da1dca76de948754f3ec5396f760e3db0ea8
child 514328 4129b9e5c6085026024b11799985276485ce0884
push id10928
push userdmitchell@mozilla.com
push dateTue, 16 Feb 2016 13:51:12 +0000
reviewersarmenzg
bugs1231320
milestone47.0a1
Bug 1231320: ensure exit status is correct when cleaning up; r?armenzg MozReview-Commit-ID: BHHy4lwAlwe
testing/taskcluster/scripts/builder/build-linux.sh
--- a/testing/taskcluster/scripts/builder/build-linux.sh
+++ b/testing/taskcluster/scripts/builder/build-linux.sh
@@ -40,19 +40,21 @@ export MOZ_SIMPLE_PACKAGE_NAME=target
 # Ensure that in tree libraries can be found
 export LIBRARY_PATH=$LIBRARY_PATH:$WORKSPACE/src/obj-firefox:$WORKSPACE/src/gcc/lib64
 
 # test required parameters are supplied
 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
 
 # run mozharness in XVfb, if necessary; this is an array to maintain the quoting in the -s argument
 if $NEED_XVFB; then
     # Some mozharness scripts set DISPLAY=:2
     Xvfb :2 -screen 0 1024x768x24 &
     export DISPLAY=:2