From 734772d36203dfe3b46bf2d956d53713adf9e277 Mon Sep 17 00:00:00 2001 From: Matthew Mellor Date: Fri, 15 May 2026 16:00:24 -0500 Subject: [PATCH] test(makefile): surface captured RUN_OUT on assert_eq failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build-pipeline smoke test captured `make _extended-image` output into RUN_OUT but only printed it on the SECOND assertion (the grep for the build-event message). When assert_eq on exit code failed first, RUN_OUT was silently dropped — CI failures became black boxes with no docker build output to diagnose from. Hit this debugging PR #44's Case 5 failure on CI (which passes locally). Adding the output dump unconditionally to assert_eq so future failures are tractable. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/test-plugin-build-pipeline.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test-plugin-build-pipeline.sh b/tests/test-plugin-build-pipeline.sh index 5b56104..bcef979 100755 --- a/tests/test-plugin-build-pipeline.sh +++ b/tests/test-plugin-build-pipeline.sh @@ -40,6 +40,13 @@ assert_eq() { local expected="$1" actual="$2" context="$3" if [ "$expected" != "$actual" ]; then echo "FAIL [$context]: expected '$expected', got '$actual'" >&2 + # If the most-recent run captured output, surface it so CI failures + # aren't black boxes. Tests that don't use RUN_OUT just print empty. + if [ -n "${RUN_OUT:-}" ]; then + echo "--- captured output ---" >&2 + echo "$RUN_OUT" >&2 + echo "--- end captured output ---" >&2 + fi exit 1 fi }