diff --git a/postgresql-jdbc.spec b/postgresql-jdbc.spec index b7f066d..6c82932 100644 --- a/postgresql-jdbc.spec +++ b/postgresql-jdbc.spec @@ -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 - 9.3.1101-3 +- run upstream testsuite when '%%runselftest' defined + * Wed Apr 23 2014 Mikolaj Izdebski - 9.3.1101-2 - Add explicit requires on java-headless