Unit Test
[platform/upstream/libxml2.git] / packaging / libxml2.spec
index 8cfa4b7..30cfca5 100644 (file)
@@ -1,5 +1,11 @@
+
+%if "%{run_tests}" == "1"
+       %define check %%check
+%endif
+
+
 Name:           libxml2
-Version:        2.9.1
+Version:        2.9.4
 Release:        0
 Summary:        A Library to Manipulate XML Files
 License:        MIT
@@ -73,10 +79,13 @@ cp %{SOURCE1001} .
 make %{?_smp_mflags} BASE_DIR="%_docdir" DOC_MODULE="%name"
 
 %check
-# qemu-arm can't keep up atm, disabling check for arm
-%ifnarch %arm
-make check
-%endif
+rm -f /tmp/%{name}_test
+%__make runtests | tee -i /tmp/%{name}_log
+cat /tmp/%{name}_log | grep "^TEST: " > /tmp/%{name}_test
+chmod +x ./run_test.sh
+./run_test.sh %{name} %{version}
+rm -f /tmp/%{name}_log
+
 
 %install
 make install DESTDIR="%buildroot" BASE_DIR="%_docdir" DOC_MODULE="%name"
@@ -88,21 +97,23 @@ ln -s libxml2/libxml %{buildroot}%{_includedir}/libxml
 
 %postun -p /sbin/ldconfig
 
-%files 
+%files
 %manifest %{name}.manifest
 %defattr(-, root, root)
-%license COPYING*
+%license Copyright
 %{_libdir}/lib*.so.*
 
 %files tools
 %manifest %{name}.manifest
 %defattr(-, root, root)
+%license Copyright
 %{_bindir}/xmllint
 %{_bindir}/xmlcatalog
 
 %files devel
 %manifest %{name}.manifest
 %defattr(-, root, root)
+%license Copyright
 %{_bindir}/xml2-config
 %dir %{_datadir}/aclocal
 %{_datadir}/aclocal/libxml.m4
@@ -113,5 +124,6 @@ ln -s libxml2/libxml %{buildroot}%{_includedir}/libxml
 %{_libdir}/libxml2.la
 %{_libdir}/*.sh
 %{_libdir}/pkgconfig/*.pc
+%{_libdir}/cmake/libxml2/libxml2-config.cmake
 
 %changelog