[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[automake-commit] branch master updated: test: output system information
From: |
Karl Berry |
Subject: |
[automake-commit] branch master updated: test: output system information after summary report. |
Date: |
Sat, 27 Jan 2024 21:08:05 -0500 |
This is an automated email from the git hooks/post-receive script.
karl pushed a commit to branch master
in repository automake.
View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=d550b6eea6da2efeb9b23794ab86b0e8d54df46a
The following commit(s) were added to refs/heads/master by this push:
new d550b6eea test: output system information after summary report.
d550b6eea is described below
commit d550b6eea6da2efeb9b23794ab86b0e8d54df46a
Author: Karl Berry <karl@freefriends.org>
AuthorDate: Sat Jan 27 18:07:48 2024 -0800
test: output system information after summary report.
From https://bugs.gnu.org/68746.
* lib/am/check.am ($(TEST_SUITE_LOG)) <output_system_information>:
new shell fn, called inline to write basic os information
into test-suite.log.
Also, question (do not change) the ".. contents:: :depth: 2"
line; what is this for?
---
lib/am/check.am | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/lib/am/check.am b/lib/am/check.am
index fad1f4f7a..d210172a6 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -319,9 +319,11 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
else \
success=false; \
fi; \
-## Make $br a line of exactly 76 '=' characters, that will be used to
+##
+## Make $br a line of exactly 76 '=' characters, which will be used to
## enclose the testsuite summary report when displayed on the console.
br='==================='; br=$$br$$br$$br$$br; \
+##
## When writing the test summary to the console, we want to color a line
## reporting the count of some result *only* if at least one test
## experienced such a result. This function is handy in this regard.
@@ -343,6 +345,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
fi; \
echo "$${color_start}# $$desc $$count$${color_end}"; \
}; \
+##
## A shell function that creates the testsuite summary. We need it
## because we have to create *two* summaries, one for test-suite.log,
## and a possibly-colorized one for console output.
@@ -356,12 +359,28 @@ $(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; \
+## 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.
echo ".. contents:: :depth: 2"; \
echo; \
for b in $$bases; do echo $$b; done \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [automake-commit] branch master updated: test: output system information after summary report.,
Karl Berry <=