From b9ef8012c2b25284d13596612db3d73492326348 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Mon, 7 Feb 2022 11:03:39 +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. Related: 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 abd54ae..879c453 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-3 - Fix stunnel in FIPS mode (with upcoming OpenSSL changes) Related: rhbz#2050617 +- Fail build if tests fail + Related: rhbz#2051083 * Sat Jan 22 2022 Fedora Release Engineering - 5.62-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild