[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#68746] system information in test-suite.log?
From: |
Karl Berry |
Subject: |
[bug#68746] system information in test-suite.log? |
Date: |
Fri, 26 Jan 2024 19:10:18 -0700 |
I had the idea that it would be helpful to put basic system information
into test-suite.log, as shown below. Although most people reporting bugs
are good about including their system info, not everyone does. And
details are good.
I figured the output of uname -a and /etc/os-release || /etc/issue would
be enough to go on. That certainly won't cover all systems, but if
nothing shows up, we'll be no worse off. I eliminated the local host
name from uname -a for privacy, just in case. I don't think anything
else in there is at all problematic.
I don't think anything anything parses test-suite.log with such rigidity
that adding some lines near the beginning will cause problems, and
automake's own make check didn't care, but I guess I don't know for sure.
If anyone sees a problem with this, let me know. --thanks, karl.
============================================
GNU Automake 1.16.90: ./test-suite.log
============================================
# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
Linux 5.14.0-362.18.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 24 23:11:18
UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
NAME="Rocky Linux"
VERSION="9.3 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.3 (Blue Onyx)"
ANSI_COLOR="0;32"
. contents:: :depth: 2
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -356,11 +359,25 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
result_count $$1 "XPASS:" $$xpass "$$red"; \
result_count $$1 "ERROR:" $$error "$$mgn"; \
}; \
+##
+## Write some basic system info in the log.
+ output_system_information () \
+ { \
+## Omit the hostname for privacy. In practice it's a single word?
+ echo; \
+ (uname -a | awk '{$$2=""; print}') 2>&1; \
+ if test -r /etc/os-release; then \
+ sed 8q /etc/os-release; \
+ elif test -r /etc/issue; then \
+ cat /etc/issue; \
+ fi; \
+ }; \
## Write "global" testsuite log.
{ \
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
$(am__rst_title); \
create_testsuite_report --no-color; \
+ output_system_information; \
echo; \
echo ".. contents:: :depth: 2"; \
echo; \
- [bug#68746] system information in test-suite.log?,
Karl Berry <=