1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
From 4a00fead920c99e480e42f5b88573c5b0944ff6d Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <anbe@debian.org>
Date: Wed, 3 Sep 2025 13:32:00 +0200
Subject: [PATCH 1/2] run_test.sh: show make.log on unexpected errors
---
run_test.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/run_test.sh b/run_test.sh
index 2790a7e..9bc11e9 100755
--- a/run_test.sh
+++ b/run_test.sh
@@ -222,13 +222,16 @@ run_with_expected_error() {
local output_log=test_cmd_output.log
local expected_output_log=test_cmd_expected_output.log
local error_code=0
+ local make_log
shift
cat > "${expected_output_log}"
stdbuf -o L -e L "$@" > "${output_log}" 2>&1 || error_code=$?
+ make_log=$(awk '{print $2}' "${output_log}" | grep make.log || true)
if [[ "${error_code}" != "${expected_error_code}" ]] ; then
echo "Error: command '$*' returned status ${error_code} instead of expected ${expected_error_code}"
cat "${output_log}"
+ [ -z "${make_log}" ] || cat "${make_log}"
rm "${expected_output_log}" "${output_log}"
return 1
fi
--
2.39.5
|