diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-02-07 19:34:50 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-02-07 21:52:25 -0500 |
commit | 4f4ac7dae9efdca7db226c8c56a240eff5d5db9f (patch) | |
tree | 7d0a03082f10d0df5be057115f2ac5cd70f28980 | |
parent | sandbox: fix typo in struct sandbox_info_t decl (diff) | |
download | sandbox-4f4ac7dae9efdca7db226c8c56a240eff5d5db9f.tar.gz sandbox-4f4ac7dae9efdca7db226c8c56a240eff5d5db9f.tar.bz2 sandbox-4f4ac7dae9efdca7db226c8c56a240eff5d5db9f.zip |
tests: add some more test scripts
Some helper scripts for automating git bisection, and add a test case for
/dev/fd/ regression.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rwxr-xr-x | tests/git-bisector.sh | 32 | ||||
-rwxr-xr-x | tests/script-0.sh | 4 |
3 files changed, 40 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 4d39d55..35bfd8c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -49,6 +49,10 @@ check_PROGRAMS = \ libsigsegv_tst \ sb_printf_tst +dist_check_SCRIPTS = \ + access.sh \ + script-0.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/git-bisector.sh b/tests/git-bisector.sh new file mode 100755 index 0000000..d873a11 --- /dev/null +++ b/tests/git-bisector.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ $# -ne 3 ] ; then + echo "Usage: $0 <test script> <bad> <good> [... more opts to git bisect ...]" + exit 1 +fi + +script=$1 +shift +if [ ! -x "$script" ] ; then + echo "Script is not executable: $script" + exit 1 +fi + +set -e +cd "${0%/*}/.." + +cp "$script" git-run-sandbox.sh +rm -f config.cache +make="make -s -j" +cat << EOF > git-run.sh +#!/bin/sh +./autogen.sh +./configure -q -C $(sandbox -V | tail -n1) +${make} clean +${make} +./src/sandbox.sh ./git-run-sandbox.sh +EOF +chmod a+rx git-run.sh + +git bisect start "$@" +exec git bisect run ./git-run.sh diff --git a/tests/script-0.sh b/tests/script-0.sh new file mode 100755 index 0000000..f06d4c4 --- /dev/null +++ b/tests/script-0.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# http://bugs.gentoo.org/257418 +(>/dev/fd/3) +exit 0 |