From: Stefano Lattarini Date: Sun, 1 May 2011 08:12:51 +0000 (+0200) Subject: testsuite: display reasons for skips to the console X-Git-Tag: ng-0.5a~89^2~262 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33bf1903819b83a31fbefe77781b5d187c6f03f7;p=thirdparty%2Fautomake.git 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_'. --- diff --git a/ChangeLog b/ChangeLog index 98b19d0d2..67b8b8def 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-05-01 Stefano Lattarini + + 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 testsuite: use `skip_' for skipping of tests diff --git a/tests/Makefile.am b/tests/Makefile.am index 0eba42331..edb516bf7 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 308b2b293..5b1fd31be 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 639319ab8..e04c88ec3 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