[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI 6/7] {tap-testsuite-work} test defs: few more sanity checks
From: |
Stefano Lattarini |
Subject: |
[FYI 6/7] {tap-testsuite-work} test defs: few more sanity checks |
Date: |
Tue, 9 Aug 2011 15:35:34 +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 | 7 +++++++
tests/defs | 16 +++++++++++-----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0cbdc9e..3ba884f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-08-09 Stefano Lattarini <address@hidden>
+ 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 <address@hidden>
+
test defs: really make them "set -e" clean
Motivated by a spurious failure of test `instsh3-w.shtst' on
Solaris 10.
diff --git a/tests/defs b/tests/defs
index cf9b86a..5e4c2c2 100644
--- a/tests/defs
+++ b/tests/defs
@@ -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
--
1.7.2.3
- [FYI 0/7] {tap-testsuite-work} Some more testsuite patches., Stefano Lattarini, 2011/08/09
- [FYI 1/7] {tap-testsuite-work} test defs: test directory creation more configurable, Stefano Lattarini, 2011/08/09
- [FYI 2/7] {tap-testsuite-work} self tests: some new uses of TAP, few extensions, Stefano Lattarini, 2011/08/09
- [FYI 3/7] {tap-testsuite-work} gitignore: update and improve for the testsuite files, Stefano Lattarini, 2011/08/09
- [FYI 4/7] {tap-testsuite-work} self tests: register an expected failures with Solaris /bin/sh, Stefano Lattarini, 2011/08/09
- [FYI 5/7] {tap-testsuite-work} test defs: really make them "set -e" clean, Stefano Lattarini, 2011/08/09
- [FYI 6/7] {tap-testsuite-work} test defs: few more sanity checks,
Stefano Lattarini <=
- [FYI 7/7] {tap-testsuite-work} self tests: avoid spurious output on console, and related fixlets, Stefano Lattarini, 2011/08/09