diff options
-rw-r--r-- | tests/common.sh | 13 |
1 files changed, 13 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>. +tests_es=0 +atexit() +{ + local es=${?} + + if [ ${?} -ne 0 ]; then + exit ${?} + else + exit ${tests_es} + fi +} +trap atexit EXIT + in_place=true builddir='.' use() |