From c97482468ce1c7071779a836d28192fc7e0232c4 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Mon, 7 Feb 2022 11:53:18 +0100 Subject: [PATCH] Fail build if tests fail The || section after make test replaced the return value of the entire statement with 0. This hides error in test execution. Resolves: rhbz#2051083 Signed-off-by: Clemens Lang --- stunnel.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stunnel.spec b/stunnel.spec index fc847ae..b2a3fd4 100644 --- a/stunnel.spec +++ b/stunnel.spec @@ -100,7 +100,13 @@ cp %{SOURCE7} %{buildroot}%{_unitdir}/%{name}@.service %endif %check -make test || (for i in tests/logs/*.log ; do echo "$i": ; cat "$i" ; done) +if ! make test; then + for i in tests/logs/*.log; do + echo "$i": + cat "$i" + done + exit 1 +fi %files %{!?_licensedir:%global license %%doc} @@ -139,6 +145,8 @@ make test || (for i in tests/logs/*.log ; do echo "$i": ; cat "$i" ; done) * Fri Feb 04 2022 Clemens Lang - 5.62-2 - Fix stunnel in FIPS mode Resolves: rhbz#2050617 +- Fail build if tests fail + Resolves: rhbz#2051083 * Tue Jan 18 2022 Clemens Lang - 5.62-1 - New upstream release 5.62