From 2f1a1fb6f396877ceb39d2dc38e76fcd315d3f21 Mon Sep 17 00:00:00 2001 From: Eduardo Santiago Date: Wed, 27 Nov 2024 13:16:59 -0700 Subject: [PATCH] make remotesystem: fail early if serial tests fail Exit status was being lost due to sequential bats invocations. Solution: preserve exit status of first (serial) run, and skip parallel tests if those fail. I am so, so sorry. Signed-off-by: Eduardo Santiago --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 22cc682187..a17270fe78 100644 --- a/Makefile +++ b/Makefile @@ -737,8 +737,11 @@ remotesystem: exit 1;\ fi;\ env PODMAN="$(CURDIR)/bin/podman-remote" bats -T --filter-tags '!ci:parallel' test/system/ ;\ - env PODMAN="$(CURDIR)/bin/podman-remote" bats -T --filter-tags ci:parallel -j $$(nproc) test/system/ ;\ - rc=$$?;\ + rc=$$?; \ + if [ $$rc -eq 0 ]; then \ + env PODMAN="$(CURDIR)/bin/podman-remote" bats -T --filter-tags ci:parallel -j $$(nproc) test/system/ ;\ + rc=$$?;\ + fi; \ kill %1;\ else \ echo "Skipping $@: 'timeout -v' unavailable'";\