]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
runtest: correctly pass shell option also for TAP tests
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Jul 2012 09:40:53 +0000 (11:40 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Jul 2012 10:23:07 +0000 (12:23 +0200)
* runtest.in: Here.  This required code refactoring not
completely trivial.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
runtest.in

index 08168b005cd0dd4d83feed3b95cd70fb2e087b10..64ad0d7eebe2070357630446fb8759d21d54e962 100644 (file)
@@ -60,12 +60,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
@@ -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"