]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
test defs: few more sanity checks
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 9 Aug 2011 10:13:53 +0000 (12:13 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 9 Aug 2011 10:13:53 +0000 (12:13 +0200)
* tests/defs: Catch some more (very unlikely) set-up or internal
errors, and diagnose them explicitly.  This is intended mostly
to be a theoretic-only improvement.

ChangeLog
tests/defs

index 0cbdc9e246e9a28ef1ef027ea87f49eae471b4a2..3ba884f7f9e9071dba9b82d7c99cb7fa49bde578 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test defs: few more sanity checks
+       * tests/defs: Catch some more (very unlikely) set-up or internal
+       errors, and diagnose them explicitly.  This is intended mostly
+       to be a theoretic-only improvement.
+
 2011-08-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        test defs: really make them "set -e" clean
index cf9b86a4f4c1d66a992d864a9dfb36873ee2ecaa..5e4c2c22ed24ca50a1e2a200f8cdfaa78b6c3f78 100644 (file)
@@ -188,7 +188,10 @@ else
 fi
 
 if test -f "$testsrcdir/$funcs_file_"; then
-  . "$testsrcdir/$funcs_file_"
+  . "$testsrcdir/$funcs_file_" || {
+    echo "$me: error sourcing $testsrcdir/$funcs_file_" >&2
+    Exit 99
+  }
 else
   echo "$me: $testsrcdir/$funcs_file_ not found, check \$testsrcdir" >&2
   Exit 99
@@ -875,9 +878,12 @@ else
   # by the cleanup trap below if the test passes.  If the test doesn't pass,
   # this directory will be kept, to facilitate debugging.
   testSubDir=$me.dir
-  test ! -d $testSubDir || rm_rf_ $testSubDir
-  mkdir $testSubDir || framework_failure_ "creating test subdirectory"
-  cd ./$testSubDir
+  test ! -d $testSubDir || rm_rf_ $testSubDir \
+    || framework_failure_ "removing old test subdirectory"
+  mkdir $testSubDir \
+    || framework_failure_ "creating test subdirectory"
+  cd ./$testSubDir \
+    || framework_failure_ "cannot chdir into test subdirectory"
   if test x"$am_create_testdir" != x"empty"; then
     cp "$top_testsrcdir"/lib/install-sh "$top_testsrcdir"/lib/missing \
        "$top_testsrcdir"/lib/depcomp . \
@@ -895,7 +901,7 @@ else
         echo "AM_INIT_AUTOMAKE"
       fi
       echo "AC_CONFIG_FILES([Makefile])"
-    } > configure.in
+    } >configure.in || framework_failure_ "creating configure.in skeleton"
   fi
 fi