spec: enable testsuite when '%runselftest == 1'

Version: 9.3.1101-3
This commit is contained in:
Pavel Raiskup 2014-05-19 14:43:36 +02:00
parent 443e467d58
commit 65ff8e04d3

View File

@ -34,7 +34,7 @@
Summary: JDBC driver for PostgreSQL
Name: postgresql-jdbc
Version: 9.3.1101
Release: 2%{?dist}
Release: 3%{?dist}
# ASL 2.0 applies only to postgresql-jdbc.pom file, the rest is BSD
License: BSD and ASL 2.0
Group: Applications/Databases
@ -113,6 +113,16 @@ install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
cp -ra build/publicapi $RPM_BUILD_ROOT%{_javadocdir}/%{name}
install -d build/publicapi docs/%{name}
%check
%if 0%{?runselftest}
# Note that this requires to have PostgreSQL properly configured; for this
# reason the testsuite is turned off by default (see org/postgresql/test/README)
ant test 2>&1 | tee test.log | grep FAILED
test $? -eq 0 && { cat test.log ; exit 1 ; }
%endif
%files -f .mfiles
%doc LICENSE README.md doc/*
%{_javadir}/%{name}2.jar
@ -124,6 +134,9 @@ install -d build/publicapi docs/%{name}
%doc %{_javadocdir}/%{name}
%changelog
* Mon May 19 2014 Pavel Raiskup <praiskup@redhat.com> - 9.3.1101-3
- run upstream testsuite when '%%runselftest' defined
* Wed Apr 23 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 9.3.1101-2
- Add explicit requires on java-headless