diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-03-12 06:27:44 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-03-12 09:00:00 -0400 |
commit | cfbf35136d5ebce4e0db6032f3c0b1ad423871d6 (patch) | |
tree | 94509220ccba66c93ecae05c84cd1409f5d3a72f /tests | |
parent | tests: filter SANDBOX_PREDICT (diff) | |
download | sandbox-cfbf35136d5ebce4e0db6032f3c0b1ad423871d6.tar.gz sandbox-cfbf35136d5ebce4e0db6032f3c0b1ad423871d6.tar.bz2 sandbox-cfbf35136d5ebce4e0db6032f3c0b1ad423871d6.zip |
sandbox: pass shell exit status up
If the command sandbox was instructed to execute failed, make sure we pass
that exact exit status back up instead of normalizing everything to 0/1.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/local.at | 2 | ||||
-rwxr-xr-x | tests/script-6.sh | 5 | ||||
-rw-r--r-- | tests/script.at | 1 |
4 files changed, 9 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 12f0999..9053546 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -67,7 +67,8 @@ dist_check_SCRIPTS = \ script-2.sh \ script-3.sh \ script-4.sh \ - script-5.sh + script-5.sh \ + script-6.sh sb_printf_tst_CFLAGS = -I$(top_srcdir)/libsbutil -I$(top_srcdir)/libsbutil/include sb_printf_tst_LDADD = $(top_builddir)/libsbutil/libsbutil.la diff --git a/tests/local.at b/tests/local.at index 8df87c1..e97f491 100644 --- a/tests/local.at +++ b/tests/local.at @@ -7,7 +7,7 @@ AT_SETUP([SB_SECTION/$1]) AT_XFAIL_IF([]SB_SECTION[-0 >/dev/null ; test $? -eq 77]) AT_SB_CHECK( [. $abs_top_srcdir/tests/]SB_SECTION[-$1.sh], - [0], + m4_ifval($4,$4,[0]), m4_ifval($2,$2,[ignore]), m4_ifval($3,$3,[ignore])) AT_CLEANUP]) diff --git a/tests/script-6.sh b/tests/script-6.sh new file mode 100755 index 0000000..fa30cb5 --- /dev/null +++ b/tests/script-6.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# make sure `sandbox` passes exit statuses back up +[ "${at_xfail}" = "yes" ] && exit 77 # see script-0 + +exit 8 diff --git a/tests/script.at b/tests/script.at index da5d229..014b457 100644 --- a/tests/script.at +++ b/tests/script.at @@ -3,3 +3,4 @@ SB_CHECK(2, [hi]) SB_CHECK(3, [OK]) SB_CHECK(4) SB_CHECK(5) +SB_CHECK(6,,,8) |