[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/32] runtest: correctly pass shell option also for TAP tests
From: |
Stefano Lattarini |
Subject: |
[PATCH 02/32] runtest: correctly pass shell option also for TAP tests |
Date: |
Thu, 26 Jul 2012 14:04:28 +0200 |
* runtest.in: Here. This required code refactoring not
completely trivial.
Signed-off-by: Stefano Lattarini <address@hidden>
---
runtest.in | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/runtest.in b/runtest.in
index 08168b0..64ad0d7 100644
--- a/runtest.in
+++ b/runtest.in
@@ -61,12 +61,6 @@ test $# -gt 0 || error "missing argument"
tst=$1; shift
case $tst in
- *.sh) wrapper () { exec "$@"; };;
- *.tap) wrapper () { exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e "$@"; };;
- *) error "test '$tst' has an unrecognized extension";;
-esac
-
-case $tst in
/*) ;;
*) if test -f ./$tst; then
tst=./$tst
@@ -79,5 +73,14 @@ case $tst in
;;
esac
-wrapper "$AM_TEST_RUNNER_SHELL" $shell_opts "$tst" "$@"
+case $tst in
+ *.sh)
+ exec $AM_TEST_RUNNER_SHELL $shell_opts "$tst" "$@" ;;
+ *.tap)
+ exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e \
+ "$AM_TEST_RUNNER_SHELL $shell_opts" "$tst" "$@" ;;
+ *)
+ error "test '$tst' has an unrecognized extension" ;;
+esac
+
error "dead code reached"
--
1.7.12.rc0
- [PATCH 00/32] {maint} Several testsuite refactorings, Stefano Lattarini, 2012/07/26
- [PATCH 01/32] cosmetics: remove leftover comment fragment from runtest.in, Stefano Lattarini, 2012/07/26
- [PATCH 05/32] build: auxiliary testsuite files/scripts built by "make all", Stefano Lattarini, 2012/07/26
- [PATCH 03/32] runtest: pass *all* the given shell options to the test invocation, Stefano Lattarini, 2012/07/26
- [PATCH 07/32] gen-tests: $testdir/ax -> $testauxdir, Stefano Lattarini, 2012/07/26
- [PATCH 02/32] runtest: correctly pass shell option also for TAP tests,
Stefano Lattarini <=
- [PATCH 04/32] perf tests: reorganize, Stefano Lattarini, 2012/07/26
- [PATCH 09/32] tests: update PATH early from AM_TESTS_ENVIRONMENT and runtest, Stefano Lattarini, 2012/07/26
- [PATCH 06/32] gen-tests: less hard-coding of 't' as the test directory, Stefano Lattarini, 2012/07/26
- [PATCH 10/32] test defs: move in 't/ax/test-defs.sh', Stefano Lattarini, 2012/07/26
- [PATCH 08/32] runtest: export $srcdir for use by the test scripts, Stefano Lattarini, 2012/07/26
- [PATCH 12/32] test init: remove a couple of paranoid sanity checks, Stefano Lattarini, 2012/07/26
- [PATCH 15/32] test init: refactor: new function 'am_exit_trap', Stefano Lattarini, 2012/07/26
- [PATCH 14/32] test init: refactor: new function 'process_requirements', Stefano Lattarini, 2012/07/26
- [PATCH 18/32] test init: refactor: new function 'am_setup_testdir', Stefano Lattarini, 2012/07/26