From: Stefano Lattarini Date: Wed, 25 Jul 2012 11:03:17 +0000 (+0200) Subject: runtest: support option --shell, tell which shell should run the test X-Git-Tag: v1.12.3~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d88ae22d7599c8617e1c53494860c65e3c1b410;p=thirdparty%2Fautomake.git runtest: support option --shell, tell which shell should run the test * runtest.in: Here. The same effect could have been obtained by exporting AM_TEST_RUNNER_SHELL to the desired value, but the new API is simpler and requires less typing and less thinking. Signed-off-by: Stefano Lattarini --- diff --git a/runtest.in b/runtest.in index 3c6981c2f..4bdcb49ea 100644 --- a/runtest.in +++ b/runtest.in @@ -32,11 +32,19 @@ shell_opts= while test $# -gt 0; do case $1 in --help) - echo "Usage: $0 [SHELL-OPTIONS] TEST [TEST-OPTIONS]" + echo "Usage: $0 [--shell=PATH] [SHELL-OPTIONS] TEST [TEST-OPTIONS]" exit $? ;; + --shell) + test $# -gt 1 || error "missing argument for option '$1'" + AM_TEST_RUNNER_SHELL=$2 + shift + ;; + --shell=*) + AM_TEST_RUNNER_SHELL=${1#--shell=} + ;; -o) - test $# -gt 1 || error "missing argument for option '-o'" + test $# -gt 1 || error "missing argument for option '$1'" shell_opts="-o $2" shift ;;