* 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 | 9 +++++++++ tests/Makefile.am | 5 ++++- tests/Makefile.in | 5 ++++- tests/self-check-report.test | 2 ++ 4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 98b19d0..67b8b8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2011-05-01 Stefano Lattarini <[email protected]> + 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 <[email protected]> + testsuite: use `skip_' for skipping of tests * tests/defs: Use the `skip_' subroutine for test skipping. Also give sometimes more detailed messages about the reasons for the diff --git a/tests/Makefile.am b/tests/Makefile.am index 0eba423..edb516b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 308b2b2..5b1fd31 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 \ diff --git a/tests/self-check-report.test b/tests/self-check-report.test index 639319a..e04c88e 100755 --- a/tests/self-check-report.test +++ b/tests/self-check-report.test @@ -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 -- 1.7.2.3
