automake-patches
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]