[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/32] test init: refactor: new function 'process_requirements'
From: |
Stefano Lattarini |
Subject: |
[PATCH 14/32] test init: refactor: new function 'process_requirements' |
Date: |
Thu, 26 Jul 2012 14:04:40 +0200 |
* 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 <address@hidden>
---
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
- [PATCH 07/32] gen-tests: $testdir/ax -> $testauxdir, (continued)
- [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, 2012/07/26
- [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 <=
- [PATCH 18/32] test init: refactor: new function 'am_setup_testdir', Stefano Lattarini, 2012/07/26
- [PATCH 13/32] test init: refactor: new function 'require_tool', Stefano Lattarini, 2012/07/26
- [PATCH 17/32] test init: refactor: new function 'am_set_exit_traps', Stefano Lattarini, 2012/07/26
- [PATCH 11/32] tests: simplify sourcing of helper shell files, Stefano Lattarini, 2012/07/26
- [PATCH 19/32] test init: refactor: move displaying of debugging info later, Stefano Lattarini, 2012/07/26
- [PATCH 16/32] configure: testsuite shell set exit traps in shell functions, Stefano Lattarini, 2012/07/26
- [PATCH 21/32] test setup: merge definitions of function for simple tests, Stefano Lattarini, 2012/07/26
- [PATCH 23/32] tests: split test libs into "generic" and "automake-specific", Stefano Lattarini, 2012/07/26
- [PATCH 27/32] configure: testsuite shell can return early from "dot-sourced" files, Stefano Lattarini, 2012/07/26
- [PATCH 25/32] tests: source test defs in the generic test lib, Stefano Lattarini, 2012/07/26