From 9553d14fd8f080af04deeb634ba6e67681740470 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 15 Aug 2014 22:23:04 -0400 Subject: tests/common.sh: Set EXIT trap --- diff --git a/tests/common.sh b/tests/common.sh index a523dee..cd90eb8 100644 --- a/tests/common.sh +++ b/tests/common.sh @@ -17,6 +17,19 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +tests_es=0 +atexit() +{ + local es=${?} + + if [ ${?} -ne 0 ]; then + exit ${?} + else + exit ${tests_es} + fi +} +trap atexit EXIT + in_place=true builddir='.' use() -- cgit v0.9.1