[3/4] gdb/testsuite: Add extract-results make target

Message ID 20260723175131.266112-4-pedro@palves.net
State New
Headers
Series Avoid command-line length limit combining test results |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Pedro Alves July 23, 2026, 5:51 p.m. UTC
  Add a new "make extract-results" target that regenerates the combined
gdb.sum/gdb.log from an existing outputs/ directory, without
re-running any tests.

This is handy after a parallel "make check" run to rebuild the
combined results by hand -- for example after tweaking
contrib/dg-extract-results.sh, to see the effect on the combined files
without a full testsuite run.

Change-Id: I67cac742343dd2c6091cf0013343af86cb86a1e7
---
 gdb/testsuite/Makefile.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)
  

Patch

diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index fb312583b0e..f671e90e125 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -276,6 +276,19 @@  check-parallel:
 	fi; \
 	exit $$result
 
+# Regenerate the combined gdb.sum / gdb.log from an existing outputs/
+# directory, without re-running any tests.  Handy after a "make check"
+# parallel run to rebuild the combined results by hand -- for example
+# after tweaking contrib/dg-extract-results.sh.
+extract-results:
+	@if test ! -d outputs; then \
+	  echo "No outputs/ directory found; run a parallel \"make check\" first."; \
+	  exit 1; \
+	fi
+	$(call DG_EXTRACT_RESULTS,outputs,.)
+	$(SHELL) $(srcdir)/lib/dg-add-core-file-count.sh
+	sed -n '/=== gdb Summary ===/,$$ p' gdb.sum
+
 check-parallel-racy:
 	-rm -rf cache racy_outputs temp
 	racyiter="$(RACY_ITER)"; \