From https://bugs.gnu.org/68855.
* NEWS: mention this.
* lib/am/check.am ($(TEST_SUITE_LOG)) <please_report>: new fn,
new wording.
* t/ax/test-defs.in (failure_footer_text): new wording.
(failure_footer_text_colorized): add red.
* t/ax/tap-summary-aux.sh (failure_footer): use failure_footer_text*.
* t/tap-doc2.sh: change grep.
* t/testsuite-summary-color.sh: likewise.
* t/testsuite-summary-count-many.sh: likewise.
* t/testsuite-summary-count.sh: likewise.
* t/testsuite-summary-reference-log.sh: likewise.
- The missing script also supports autoreconf, autogen, and perl.
(https://lists.gnu.org/archive/html/automake-patches/2015-08/msg00000.html)
+ - test-suite.log now contains basic system information, and the
+ console message about bug reporting on failure has a bit more detail.
+ (bug#68746)
+
* Bugs fixed
- Generated file timestamp checks handle filesystems with sub-second
## Exists only to be overridden. See bug#11745.
AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+## emacs-page
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__set_TESTS_bases); \
## Helper shell function, tells whether a path refers to an existing,
result_count $$1 "ERROR:" $$error "$$mgn"; \
}; \
##
-## Write some basic system info in the log.
+## Function to write some basic system info in the log.
output_system_information () \
{ \
## Omit the hostname for privacy. In practice it's a single word?
cat /etc/issue; \
fi; \
}; \
+##
+## Function to output the "please report bugs" message.
+ please_report () \
+ { \
+echo "Some test(s) failed. Please report this to $(PACKAGE_BUGREPORT),"; \
+echo "together with the test-suite.log file (gzipped) and your system"; \
+echo "information. Thanks."; \
+ }; \
+##
+## emacs-page
## Write "global" testsuite log.
{ \
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
create_testsuite_report --no-color; \
output_system_information; \
echo; \
-## What is this line for? It seems to be intended for machine parsing,
-## but I can't find any other reference to it. --karl, 27jan24.
+## What is this line for? It's a Sphinx reStructuredText directive that
+## would insert a table of contents that goes two levels deep on headings.
+## But why is it in test-suite.log? No other references to it are evident.
+## Please inform automake@gnu.org.
echo ".. contents:: :depth: 2"; \
echo; \
for b in $$bases; do echo $$b; done \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
if $$success; then :; else \
- echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG) for debugging.$${std}";\
if test -n "$(PACKAGE_BUGREPORT)"; then \
- echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ please_report | sed -e "s/^/$${col}/" -e s/'$$'/"$${std}"/; \
fi; \
echo "$$col$$br$$std"; \
fi; \
mgn="$esc[0;35m"
brg="$esc[1m"
std="$esc[m"
+ failure_footer="\
+${red}${br}${std}
+$failure_footer_text_colorized
+${red}${br}${std}"
+
else
red= grn= lgn= blu= mgn= brg= std=
+ failure_footer="\
+${red}${br}${std}
+$failure_footer_text
+${red}${br}${std}"
fi
success_header="\
failure_header="\
${red}${br}${std}
${red}Testsuite summary for GNU AutoTAP 5.12${std}
-${red}${br}${std}"
-
- failure_footer="\
-${red}${br}${std}
-${red}See ./test-suite.log${std}
-${red}Please report to bug-automake@gnu.org${std}
${red}${br}${std}"
$ACLOCAL
# in UTC; see <https://www.gnu.org/gnu/initial-announcement.html>.
old_timestamp=198309271735.59
+# We need this in multiple tests and the wording is subject to change.
+# Don't include the ${br} lines since br is not defined at this point.
+#
+failure_footer_text="\
+See ./test-suite.log for debugging.
+Some test(s) failed. Please report this to bug-automake@gnu.org,
+together with the test-suite.log file (gzipped) and your system
+information. Thanks."
+#
+# And with color.
+red='\e[0;31m'
+std='\e[m';
+failure_footer_text_colorized="`echo \"$failure_footer_text\" | sed -e "s/^/${red}/" -e s/'$'/"${std}"/`"
+
# Make our wrapper script (or installed scripts, if running under
# "installcheck") accessible by default. And avoid uselessly
# extending $PATH multiple times if this file is sourced multiple times.
cat got
diff exp got
-grep '^Please report to bug-automake@gnu\.org$' stdout
+grep 'Please report this to bug-automake@gnu\.org' stdout
run_make -O check \
TESTS='foo.test baz.test' \
failure_footer="\
${red}${br}${std}
-${red}See ./test-suite.log${std}
-${red}Please report to bug-automake@gnu.org${std}
+$failure_footer_text_colorized
${red}${br}${std}"
do_check '' <<END
footer="\
${br}
-See ./test-suite.log
+See ./test-suite.log for debugging.
${br}"
echo AC_OUTPUT >> configure.ac
failure_footer="\
${br}
-See ./test-suite.log
-Please report to bug-automake@gnu.org
+$failure_footer_text
${br}"
# Corner cases.
../configure
run_make -O -e FAIL check
-grep '^See \./my_test_suite\.log$' stdout
+grep '^See \./my_test_suite\.log for debugging\.$' stdout
mkdir bar
run_make -O -e FAIL TEST_SUITE_LOG=bar/bar.log check
-grep '^See \./bar/bar\.log$' stdout
+grep '^See \./bar/bar\.log for debugging\.$' stdout
cd ..
./configure
run_make -O -e FAIL check
-grep '^See sub/test-suite\.log$' stdout
+grep '^See sub/test-suite\.log for debugging\.$' stdout
cd sub
run_make -O -e FAIL check
-grep '^See sub/test-suite\.log$' stdout
+grep '^See sub/test-suite\.log for debugging\.$' stdout
cd ..
run_make -O -e FAIL TEST_SUITE_LOG=foo.log check
-grep '^See sub/foo\.log$' stdout
+grep '^See sub/foo\.log for debugging\.$' stdout
: