]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
testsuite: display reasons for skips to the console
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 1 May 2011 08:12:51 +0000 (10:12 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 1 May 2011 12:46:52 +0000 (14:46 +0200)
* tests/Makefile.am (AM_TESTS_ENVIRONMENT): Open file descriptor
`9' to the original stderr; define `stderr_fileno_' to `9', and
export it.
* tests/self-check-report.test: Prevent new spurious failures by
removing from the environment any definition of `stderr_fileno_'.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/self-check-report.test

index 98b19d0d2b4303b34a7aa88b32795a54d0d144e7..67b8b8defd867ed36e0cf59ada8160863cc2a785 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       testsuite: display reasons for skips to the console
+       * tests/Makefile.am (AM_TESTS_ENVIRONMENT): Open file descriptor
+       `9' to the original stderr; define `stderr_fileno_' to `9', and
+       export it.
+       * tests/self-check-report.test: Prevent new spurious failures by
+       removing from the environment any definition of `stderr_fileno_'.
+
 2011-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        testsuite: use `skip_' for skipping of tests
index 0eba42331bd1441e5534afbbdcd675b0f0faa484..edb516bf7a5727c0b936619beef1cb56c3f8438a 100644 (file)
@@ -100,12 +100,15 @@ XFAIL_TESTS += $(instspc_xfail_tests)
 
 # Some testsuite-influential variables should be overridable from the
 # test scripts, but not from the environment.
+# We want warning messages and explanations for skipped tests to go to
+# the console if possible, so set up `stderr_fileno_' properly.
 AM_TESTS_ENVIRONMENT = \
   test x"$$me" = x || unset me; \
   test x"$$required" = x || unset required; \
   test x"$$parallel_tests" = x || unset parallel_tests; \
   test x"$$original_AUTOMAKE" = x || unset original_AUTOMAKE; \
-  test x"$$original_ACLOCAL" = x || unset original_ACLOCAL;
+  test x"$$original_ACLOCAL" = x || unset original_ACLOCAL; \
+  exec 9>&2; stderr_fileno_=9; export stderr_fileno_;
 
 TESTS = \
 aclocal.test \
index 308b2b293eb241b9e81bd1502850ea823295feb8..5b1fd31be6d05309541f15083b1ac0e3cc850e7f 100644 (file)
@@ -365,12 +365,15 @@ instspc_xfail_tests = instspc-squote-build.test \
 
 # Some testsuite-influential variables should be overridable from the
 # test scripts, but not from the environment.
+# We want warning messages and explanations for skipped tests to go to
+# the console if possible, so set up `stderr_fileno_' properly.
 AM_TESTS_ENVIRONMENT = \
   test x"$$me" = x || unset me; \
   test x"$$required" = x || unset required; \
   test x"$$parallel_tests" = x || unset parallel_tests; \
   test x"$$original_AUTOMAKE" = x || unset original_AUTOMAKE; \
-  test x"$$original_ACLOCAL" = x || unset original_ACLOCAL;
+  test x"$$original_ACLOCAL" = x || unset original_ACLOCAL; \
+  exec 9>&2; stderr_fileno_=9; export stderr_fileno_;
 
 TESTS = \
 aclocal.test \
index 639319ab8642a37a4ec3aa318e4498cd1c026954..e04c88ec3e53582ebbe624c3b85ca90b446a6c2c 100755 (executable)
@@ -18,6 +18,8 @@
 # Test subroutines to report warnings, and to signal failures, skips
 # and hard errors.
 
+unset stderr_fileno_ || :
+
 . ./defs || Exit 1
 
 set +e