* t/ax/test-init.sh (process_requirements): Here. Use it in to check that the tools in $required are present.
Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com> --- t/ax/test-init.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/t/ax/test-init.sh b/t/ax/test-init.sh index d6fc8a6..d760d6e 100644 --- a/t/ax/test-init.sh +++ b/t/ax/test-init.sh @@ -870,17 +870,24 @@ require_tool () esac } -# Look for (and maybe set up) required tools and/or system features; skip -# the current test if they are not found. -for am_tool in $required; do - require_tool $am_tool -done -unset am_tool - -# We might need extra macros, e.g., from Libtool or Gettext. -case " $required " in *\ libtool*) . ./t/libtool-macros.dir/get.sh;; esac -case " $required " in *\ gettext*) . ./t/gettext-macros.dir/get.sh;; esac +process_requirements () +{ + # Look for (and maybe set up) required tools and/or system features; + # skip the current test if they are not found. + for am_tool in $*; do + require_tool $am_tool + done + unset am_tool + # We might need extra macros, e.g., from Libtool or Gettext. + case " $required " in + *\ libtool*) . ./t/libtool-macros.dir/get.sh;; + esac + case " $required " in + *\ gettext*) . ./t/gettext-macros.dir/get.sh;; + esac +} +process_requirements $required ## ---------------------------------------------------------------- ## ## Create and set up of the temporary directory used by the test. ## -- 1.7.12.rc0