[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] {maint} tests init: don't automatically re-execute tests wit
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH] {maint} tests init: don't automatically re-execute tests with a POSIX shell |
Date: |
Fri, 06 Jul 2012 21:39:05 +0200 |
On 07/06/2012 01:21 PM, Stefano Lattarini wrote:
> I've unwittingly broken support for that feature *again* in some of
> my recent testsuite tweaking. In this case, the re-execution code
> works correctly when the tests are executed with a POSIX shells, but
> breaks when they are invoked by an old-style Bourne shells (e.g.,
> /bin/sh on Solaris).
>
> It's time to face it: that feature is too much brittle, and too seldom
> used (because the Makefile takes care of running the tests with the
> correct shell anyway, so that a breakage is only experienced when
> running the tests by hand). It just don't remain working for long, not
> when we often touch the testsuite setup (which we are going to do again
> when we'll try to move part of our testsuite framework to Gnulib, or a
> similar project).
>
> So, instead of trying to be extra-smart and automatically re-execute the
> tests with the correct shell, we now offer a simple wrapper script that
> the user can employ to run the test scripts with the proper shell. And
> while we are at it, we write this wrapper to also deal with TAP tests in
> a better way, running them through the prove(1) utility, so that their
> results are correctly recognized and reported.
>
> * t/ax/test-runner.in: New file; the wrapper script we were talking about.
> * configure.ac (AC_CONFIG_FILES): Process it into 't/ax/test-runner'.
> * defs: Remove code for automatic re-execution of the scripts with the
> correct shell. This file now just a very thin layer around 'defs-static'
> and 't/ax/test-init.sh'.
> * t/README: Adjust, and remove or fix some imprecise or outdated text in
> the process (like "... test scripts are written with portability in mind,
> so that they should run with any decent Bourne-compatible shell ..." ).
> * Makefile.am (AM_TESTS_ENVIRONMENT): No need to export 'AM_TESTS_REEXEC'
> to "no" anymore.
> * t/self-check-explicit-skips.sh: Likewise.
> * t/self-check-exit.tap: Likewise.
> * t/self-check-me.tap: Likewise.
> * t/self-check-dir.tap: Likewise.
> * t/self-check-cleanup.tap: Likewise.
> * t/self-check-reexec.tap: Remove as obsolete.
> * t/list-of-tests.mk: Adjust.
>
> ---
>
> I will push this by this evening if there are no objections.
>
Pushed, with the following corrections squashed in:
diff --git a/configure.ac b/configure.ac
index 8ec92ba..10fa93d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -559,7 +559,7 @@ AC_SUBST([EXEEXT])
## ---------------------- ##
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([t/ax/test-runner])
+AC_CONFIG_FILES([t/ax/test-runner], [chmod +x t/ax/test-runner])
AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
AC_CONFIG_LINKS([defs:defs])
diff --git a/t/ax/test-runner.in b/t/ax/test-runner.in
index dacac35..31f8e01 100644
--- a/t/ax/test-runner.in
+++ b/t/ax/test-runner.in
@@ -58,5 +58,5 @@ case $tst in
;;
esac
-wrapper "$tst" "$@"
+wrapper "$AM_TEST_RUNNER_SHELL" "$tst" "$@"
error "dead code reached"
diff --git a/.gitignore b/.gitignore
index 130b390..2b9edac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,6 +37,7 @@
/t/wrap/automake-1.*
/defs-static
/t/testsuite-part.am
+/t/ax/test-runner
/t/*-w.tap
/t/*-w.sh
/t/depcomp-*.tap
Regards,
Stefano