[iniparser] Make it possible to contitionally run the testsuite.

asn asn at fedoraproject.org
Thu Dec 6 09:44:19 UTC 2012


commit c0e2a0cc0dea49768ebce1cd6452583280ee53c3
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Tue Dec 4 16:07:59 2012 +0100

    Make it possible to contitionally run the testsuite.
    
    rpmbuild --rebuild --with testsuite iniparser.rpm

 iniparser.spec |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/iniparser.spec b/iniparser.spec
index 29619ce..0d668f6 100644
--- a/iniparser.spec
+++ b/iniparser.spec
@@ -1,3 +1,6 @@
+# Set --with test to run the Samba torture testsuite.
+%bcond_with testsuite
+
 Name:		iniparser
 Version:	3.1
 Release:	1%{?dist}
@@ -40,6 +43,13 @@ install -m 644 -t %{buildroot}%{_includedir}/ src/dictionary.h src/iniparser.h
 install -m 755 -t %{buildroot}%{_libdir}/ libiniparser.so.0
 ln -s libiniparser.so.0 %{buildroot}%{_libdir}/libiniparser.so
 
+%if %{with testsuite}
+%check
+make check
+./test/iniexample
+./test/parse test/twisted.ini
+%endif
+
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig


More information about the scm-commits mailing list