diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-26 11:40:53 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-26 12:23:07 +0200 |
commit | d25349fe0524e7b6c7961f090cced631ee95aff6 (patch) | |
tree | 12319c7d73e22ff6caf68ad3a7c0462c8371f233 /runtest.in | |
parent | b4f5f5b31ad281dd3d11b19ee125da7fc9e948f4 (diff) | |
download | automake-d25349fe0524e7b6c7961f090cced631ee95aff6.tar.gz |
runtest: correctly pass shell option also for TAP tests
* runtest.in: Here. This required code refactoring not
completely trivial.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'runtest.in')
-rw-r--r-- | runtest.in | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/runtest.in b/runtest.in index 08168b005..64ad0d7ee 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" |