From 9470688ee1e1a056035f267ed4e5ce3d1c992424 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 5 Nov 2025 12:54:33 +0200 Subject: [PATCH] Makefile.test.include: Use "make check" tests in parallel --- Makefile.test.include | 9 ++++----- build-aux/run-test.sh.in | 29 ++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Makefile.test.include b/Makefile.test.include index 2021a315ba..8ffa206cf3 100644 --- a/Makefile.test.include +++ b/Makefile.test.include @@ -1,6 +1,5 @@ +AUTOMAKE_OPTIONS = parallel-tests +check_PROGRAMS = $(test_programs) noinst_PROGRAMS = $(test_programs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) NOCHILDREN_TESTS="$(NOCHILDREN_TESTS)" ./$$bin; then exit 1; fi; \ - done +TESTS = $(test_programs) +TESTS_ENVIRONMENT = $(RUN_TEST) NOCHILDREN_TESTS="$(NOCHILDREN_TESTS)" diff --git a/build-aux/run-test.sh.in b/build-aux/run-test.sh.in index f2297891dc..61f6853f39 100644 --- a/build-aux/run-test.sh.in +++ b/build-aux/run-test.sh.in @@ -5,7 +5,33 @@ set -eu function get_test_name() { - basename "$1" + while [ $# -gt 0 ]; do + case "$1" in + --test-name) + echo "$2" + return + ;; + *) + shift + ;; + esac + done + echo "Missing --test-name parameter" >&2 + exit 1 +} + +function cat_log_file() { + while [ $# -gt 0 ]; do + case "$1" in + --log-file) + cat $2 + break + ;; + *) + shift + ;; + esac + done } top_srcdir="@abs_top_srcdir@" @@ -63,4 +89,5 @@ if test $ret != 0; then echo "Failed to run: $@" >&2 fi +cat_log_file "$@" exit $ret -- 2.47.3