2007-11-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Run each test in a process-private subdirectory.
+ * tests/defs.in: Employ a trap to clean up at the end of the
+ test in case the test succeeded. This needs to be revisited
+ because we would like to keep the output of XPASSing tests.
+ Also, note when we were interrupted by a signal. Code taken
+ from Autoconf's _AC_INIT_PREPARE.
+ If $keep_testdirs is set, keep them even for successful tests.
+ * tests/Makefile.am (check-clean-local): New target. Remove all
+ tests subdirs, but also make them writable first. The latter
+ was already needed without per-test subdirs.
+ (distclean-local): Depend upon check-clean-local.
+ * tests/Makefile.in: Regenerate.
+ * tests/.cvsignore, tests/.gitignore: Adjust.
+
Fix default includes ordering to be `-I. -I$(srcdir) ...' again.
* automake.in (handle_compile): Put -I$(srcdir) before include
paths for config headers, as was done before Automake 1.10, but
* Make sure each test file is executable
+* Use `keep_testdirs=yes' to keep test directories for successful
+ tests also.
================================================================
= Release procedure
defs
diffs
log
-testSubDir
+*.dir
aclocal-*
automake-*
aclocal-*
automake-*
defs
-testSubDir
+*.dir
# Each test case depends on defs, aclocal, and automake.
check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
-distclean-local:
- -rm -rf testSubDir
+distclean-local: check-clean-local
+
+check-clean-local:
+ -chmod -R u+rwx *.dir
+ -rm -rf *.dir
pdf-am ps ps-am uninstall uninstall-am
-distclean-local:
- -rm -rf testSubDir
+distclean-local: check-clean-local
+
+check-clean-local:
+ -chmod -R u+rwx *.dir
+ -rm -rf *.dir
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
;;
esac
-chmod -R a+rwx testSubDir > /dev/null 2>&1
-rm -rf testSubDir > /dev/null 2>&1
-mkdir testSubDir
+curdir=`pwd`
+testSubDir=$me.dir
+chmod -R u+rwx $testSubDir > /dev/null 2>&1
+rm -rf $testSubDir > /dev/null 2>&1
+mkdir $testSubDir
+
+trap 'exit_status=$?
+ cd "$curdir"
+ case $exit_status,$keep_testdirs in
+ 0,)
+ chmod -R a+rwx $testSubDir > /dev/null 2>&1
+ rm -rf "$testSubDir" ;;
+ esac
+ test "$signal" != 0 &&
+ echo "$as_me: caught signal $signal"
+ echo "$as_me: exit $exit_status"
+ exit $exit_status
+' 0
+for signal in 1 2 13 15; do
+ trap 'signal='$signal'; { (exit 1); exit 1; }' $signal
+done
+signal=0
# Copy in some files we need.
for file in install-sh missing depcomp; do
- cp $srcdir/../lib/$file testSubDir/$file || exit 1
+ cp $srcdir/../lib/$file $testSubDir/$file || exit 1
done
-cd ./testSubDir
+cd ./$testSubDir
# Build appropriate environment in test directory. Eg create
# configure.in, touch all necessary files, etc.