automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {maint} tests: report useful system information from 'test-suite.l


From: Stefano Lattarini
Subject: [FYI] {maint} tests: report useful system information from 'test-suite.log'
Date: Thu, 22 Dec 2011 15:30:09 +0100

It has already happened various times that a user has run the
automake testsuite, experienced a failure, read the messages
telling him "See tests/test-suite.log" and "Please report to
address@hidden", and done exactly that -- sending us only
the contents of `tests/test-suite.log', which are usually not
enough to start debugging the reported failure.  So we have to
ask him for more details, and usually also for the `config.log'
file generated by configure.  It's time to fix this recurring
feedback inefficiency.  We do so by creating a dummy test case
that takes care of copying the contents of `config.log', plus
other useful system information, in the final `test-suite.log'.

* tests/get-sysconf.test: New test, gathering system information
and then always terminating with a SKIP, so that its output gets
copied in `test-suite.log'.
* tests/Makefile.am (TESTS): Add it.
---
 ChangeLog              |   19 +++++++++++++++++++
 tests/Makefile.am      |    1 +
 tests/get-sysconf.test |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+), 0 deletions(-)
 create mode 100755 tests/get-sysconf.test

diff --git a/ChangeLog b/ChangeLog
index a8f1816..3af9e45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2011-12-22  Stefano Lattarini  <address@hidden>
+
+       tests: report useful system information from 'test-suite.log'
+       It has already happened various times that a user has run the
+       automake testsuite, experienced a failure, read the messages
+       telling him "See tests/test-suite.log" and "Please report to
+       address@hidden", and done exactly that -- sending us only
+       the contents of `tests/test-suite.log', which are usually not
+       enough to start debugging the reported failure.  So we have to
+       ask him for more details, and usually also for the `config.log'
+       file generated by configure.  It's time to fix this recurring
+       feedback inefficiency.  We do so by creating a dummy test case
+       that takes care of copying the contents of `config.log', plus
+       other useful system information, in the final `test-suite.log'.
+       * tests/get-sysconf.test: New test, gathering system information
+       and then always terminating with a SKIP, so that its output gets
+       copied in `test-suite.log'.
+       * tests/Makefile.am (TESTS): Add it.
+
 2011-12-07  Reuben Thomas  <address@hidden>  (tiny change)
 
        python: remove relics for Python 1.5 support
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8e3c1d1..1ad0cfb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -52,6 +52,7 @@ TESTS_ENVIRONMENT = \
   test x"$$parallel_tests" = x || unset parallel_tests;
 
 TESTS = \
+get-sysconf.test \
 self-check-env-sanitize.test \
 self-check-report.test \
 aclibobj.test \
diff --git a/tests/get-sysconf.test b/tests/get-sysconf.test
new file mode 100755
index 0000000..3e361a8
--- /dev/null
+++ b/tests/get-sysconf.test
@@ -0,0 +1,48 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Dummy test case, aimed at reporting useful system information in the
+# final `test-suite.log'.  This way, if a user experiencing a failure in
+# the Automake test suite only sends us the `test-suite.log' file upon,
+# we won't have to ask him for more information to start analyzing the
+# failure (that had happened too many times in the past!).
+
+. ./defs || Exit 1
+
+set -e
+
+# FIXME: remove these once we are merged into master.
+top_testsrcdir=$testsrcdir/..
+testbuilddir=`(cd .. && pwd)`
+top_testbuilddir=`(cd $testbuilddir/.. && pwd)`
+
+st=0
+sed 20q "$top_testsrcdir/ChangeLog" || st=1
+$PERL -V || st=1
+cat "$top_testbuilddir/config.log" || st=1
+cat "$testbuilddir/aclocal-$APIVERSION" || st=1
+cat "$testbuilddir/automake-$APIVERSION" || st=1
+
+if test $st -eq 0; then
+  # This test SKIPs, so that all the information is has gathered and
+  # printed will get unconditionally copied into the `test-suite.log'
+  # file.
+  Exit 77
+fi
+
+# Some unexpected error occurred; this must be reported as an hard error
+# by the testsuite driver.
+Exit 99
-- 
1.7.7.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]