[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {tap-testsuite-work} testsuite: do fd redirections with $(AM_TESTS
From: |
Stefano Lattarini |
Subject: |
[FYI] {tap-testsuite-work} testsuite: do fd redirections with $(AM_TESTS_FD_REDIRECT) |
Date: |
Sat, 6 Aug 2011 11:00:48 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
* tests/Makefile.am: The redirections of file descriptors needed
by our test scripts is now done using the $(AM_TESTS_FD_REDIRECT)
variable (the new blessed way since commit `v1.11-906-gb9e9d54'),
not using an hack involving $(AM_TESTS_ENVIRONMENT). This has
the further benefit of allowing the use of $(TESTS_ENVIRONMENT)
again on part of the users.
* tests/Makefile.am (AM_TESTS_ENVIRONMENT): Remove redirection of
file descriptors.
(AM_TESTS_FD_REDIRECT): Redirect file descriptor 9 to original
stderr.
Comments adjusted.
* tests/plain-functions.sh ($stderr_fileno_): Update comment.
---
ChangeLog | 16 ++++++++++++++++
tests/Makefile.am | 26 ++++++++++----------------
tests/Makefile.in | 27 +++++++++------------------
tests/plain-functions.sh | 5 +++--
4 files changed, 38 insertions(+), 36 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e8756c6..c7d2b07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-08-06 Stefano Lattarini <address@hidden>
+
+ testsuite: do fd redirections with $(AM_TESTS_FD_REDIRECT)
+ * tests/Makefile.am: The redirections of file descriptors needed
+ by our test scripts is now done using the $(AM_TESTS_FD_REDIRECT)
+ variable (the new blessed way since commit `v1.11-906-gb9e9d54'),
+ not using an hack involving $(AM_TESTS_ENVIRONMENT). This has
+ the further benefit of allowing the use of $(TESTS_ENVIRONMENT)
+ again on part of the users.
+ * tests/Makefile.am (AM_TESTS_ENVIRONMENT): Remove redirection of
+ file descriptors.
+ (AM_TESTS_FD_REDIRECT): Redirect file descriptor 9 to original
+ stderr.
+ Comments adjusted.
+ * tests/plain-functions.sh ($stderr_fileno_): Update comment.
+
2011-08-05 Stefano Lattarini <address@hidden>
testsuite: use custom TAP diagnostic in our own tests
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 425112b..6a404c7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -127,19 +127,6 @@ $(config_shell_tests):
# Some testsuite-influential variables should be overridable from the
# test scripts, but not from the environment.
-# The `AM_TESTS_REEXEC=no' setting tells the tests not to needlessly
-# re-execute themselves with the shell detected at configure time, since
-# we are already running them under it explicitly in our setup (see e.g.
-# the definition of TEST_LOG_COMPILER above).
-# We want warning messages and explanations for skipped tests to go to
-# the console if possible, so set up `stderr_fileno_' properly.
-# The `9>&2' redirection *must* be placed at the end, and without a
-# following semicolon, because some shells (e.g., various Korn Shells
-# or HP-HX /bin/sh) close any file descriptor > 2 upon `exec' sycall.
-# For more references, with lots of discussion, see:
-# - http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00002.html
-# - http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488
-# - http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8846
AM_TESTS_ENVIRONMENT = \
test x"$$me" = x || unset me; \
test x"$$required" = x || unset required; \
@@ -147,9 +134,16 @@ AM_TESTS_ENVIRONMENT = \
test x"$$parallel_tests" = x || unset parallel_tests; \
test x"$$test_prefer_config_shell" || unset test_prefer_config_shell; \
test x"$$original_AUTOMAKE" = x || unset original_AUTOMAKE; \
- test x"$$original_ACLOCAL" = x || unset original_ACLOCAL; \
- AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC; \
- stderr_fileno_=9; export stderr_fileno_; 9>&2
+ test x"$$original_ACLOCAL" = x || unset original_ACLOCAL;
+# The `AM_TESTS_REEXEC=no' setting tells the tests not to needlessly
+# re-execute themselves with the shell detected at configure time, since
+# we are already running them under it explicitly in our setup (see e.g.
+# the definition of TEST_LOG_COMPILER above).
+AM_TESTS_ENVIRONMENT += AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC;
+# We want warning messages and explanations for skipped tests to go to
+# the console if possible, so set up `stderr_fileno_' properly.
+AM_TESTS_FD_REDIRECT = 9>&2
+AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
TESTS = \
$(handwritten_tests) \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d371452..c79e523 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -401,26 +401,17 @@ SHTST_LOG_COMPILER = $(SHELL)
$(srcdir)/config-shell-tests.sh
# re-execute themselves with the shell detected at configure time, since
# we are already running them under it explicitly in our setup (see e.g.
# the definition of TEST_LOG_COMPILER above).
+AM_TESTS_ENVIRONMENT = test x"$$me" = x || unset me; test \
+ x"$$required" = x || unset required; test x"$$use_tap" = x || \
+ unset use_tap; test x"$$parallel_tests" = x || unset \
+ parallel_tests; test x"$$test_prefer_config_shell" || unset \
+ test_prefer_config_shell; test x"$$original_AUTOMAKE" = x || \
+ unset original_AUTOMAKE; test x"$$original_ACLOCAL" = x || \
+ unset original_ACLOCAL; AM_TESTS_REEXEC=no; export \
+ AM_TESTS_REEXEC; stderr_fileno_=9; export stderr_fileno_;
# We want warning messages and explanations for skipped tests to go to
# the console if possible, so set up `stderr_fileno_' properly.
-# The `9>&2' redirection *must* be placed at the end, and without a
-# following semicolon, because some shells (e.g., various Korn Shells
-# or HP-HX /bin/sh) close any file descriptor > 2 upon `exec' sycall.
-# For more references, with lots of discussion, see:
-# - http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00002.html
-# - http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488
-# - http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8846
-AM_TESTS_ENVIRONMENT = \
- test x"$$me" = x || unset me; \
- test x"$$required" = x || unset required; \
- test x"$$use_tap" = x || unset use_tap; \
- test x"$$parallel_tests" = x || unset parallel_tests; \
- test x"$$test_prefer_config_shell" || unset test_prefer_config_shell; \
- test x"$$original_AUTOMAKE" = x || unset original_AUTOMAKE; \
- test x"$$original_ACLOCAL" = x || unset original_ACLOCAL; \
- AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC; \
- stderr_fileno_=9; export stderr_fileno_; 9>&2
-
+AM_TESTS_FD_REDIRECT = 9>&2
TESTS = \
$(handwritten_tests) \
$(config_shell_tests) \
diff --git a/tests/plain-functions.sh b/tests/plain-functions.sh
index c142f05..c95ff1f 100644
--- a/tests/plain-functions.sh
+++ b/tests/plain-functions.sh
@@ -20,8 +20,9 @@
# Print warnings (e.g., about skipped and failed tests) to this file
# number. Override by putting, say:
-# stderr_fileno_=9; export stderr_fileno_; exec 9>&2;
-# in the definition of AM_TESTS_ENVIRONMENT.
+# AM_TESTS_ENVIRONMENT = stderr_fileno_=9; export stderr_fileno_;
+# AM_TESTS_FD_REDIRECT = 9>&2
+# in your Makefile.am.
# This is useful when using automake's parallel tests mode, to print the
# reason for skip/failure to console, rather than to the *.log files.
: ${stderr_fileno_=2}
--
1.7.2.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] {tap-testsuite-work} testsuite: do fd redirections with $(AM_TESTS_FD_REDIRECT),
Stefano Lattarini <=