automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 18/32] test init: refactor: new function 'am_setup_testdir'


From: Stefano Lattarini
Subject: [PATCH 18/32] test init: refactor: new function 'am_setup_testdir'
Date: Thu, 26 Jul 2012 14:04:44 +0200

* t/ax/test-init.sh (am_setup_testdir): Here.
Use it instead of inlining its contents in the main code.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/ax/test-init.sh | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/t/ax/test-init.sh b/t/ax/test-init.sh
index 2b745dd..06079b2 100644
--- a/t/ax/test-init.sh
+++ b/t/ax/test-init.sh
@@ -966,10 +966,8 @@ am_set_exit_traps ()
 
 am_set_exit_traps
 
-# Create and populate the temporary directory, if and as required.
-if test x"$am_create_testdir" = x"no"; then
-  am_test_subdir=
-else
+am_setup_testdir ()
+{
   # The subdirectory where the current test script will run and write its
   # temporary/data files.  This will be created shortly, and will be removed
   # by the cleanup trap below if the test passes.  If the test doesn't pass,
@@ -1004,6 +1002,13 @@ else
       echo "AC_CONFIG_FILES([Makefile])"
     } >configure.ac || framework_failure_ "creating configure.ac skeleton"
   fi
+}
+
+# Create and populate the temporary directory, if and as required.
+if test x"$am_create_testdir" = x"no"; then
+  am_test_subdir=
+else
+  am_setup_testdir
 fi
 
 
-- 
1.7.12.rc0




reply via email to

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