From 65ff8e04d34b94fcd4c407e871d60a46015d241c Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 19 May 2014 14:43:36 +0200 Subject: [PATCH] spec: enable testsuite when '%runselftest == 1' Version: 9.3.1101-3 --- postgresql-jdbc.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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