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 <cllang@redhat.com>
This commit is contained in:
Clemens Lang 2022-02-07 11:53:18 +01:00
parent ecdba103e6
commit c97482468c
1 changed files with 9 additions and 1 deletions

View File

@ -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 <cllang@redhat.com> - 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 <cllang@redhat.com> - 5.62-1
- New upstream release 5.62