From d22f43b965cb5dcfa2c536802e3d3644bb80a25b Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 17 Jun 2024 00:32:07 -0700 Subject: [PATCH] test: Improve output of system information in test-suite.log. Fixes https://bugs.gnu.org/71421. * lib/am/check.am ($(TEST_SUITE_LOG): Use $(AWK) instead of 'awk'. Remove an extra space in uname output. Start the line with "System information:". --- lib/am/check.am | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/am/check.am b/lib/am/check.am index a506d1c79..04af927a1 100644 --- a/lib/am/check.am +++ b/lib/am/check.am @@ -366,10 +366,20 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) { \ ## Omit the hostname for privacy. In practice it's a single word? echo; \ - (uname -a | awk '{$$2=""; print}') 2>&1; \ + { uname -a | $(AWK) '{ \ + printf "System information:"; \ + for (i = 1; i < NF; ++i) \ + { \ + if (i != 2) \ + printf " %s", $$i; \ + } \ + printf "\n"; \ +}'; } 2>&1; \ if test -r /etc/os-release; then \ + echo "Distribution:"; \ sed 8q /etc/os-release; \ elif test -r /etc/issue; then \ + echo "Distribution:"; \ cat /etc/issue; \ fi; \ }; \ -- 2.45.2