[libhtp/el6] Run the unit tests

Mathieu Bridon bochecha at fedoraproject.org
Fri Dec 12 18:23:42 UTC 2014


commit 12b0507cb390bdf5bb454cd3690ece8b4282e473
Author: Mathieu Bridon <bochecha at daitauha.fr>
Date:   Fri Dec 12 18:05:32 2014 +0100

    Run the unit tests

 0001-tests-Fix-building-the-unit-tests.patch |   24 ++++++++++++++++++++++++
 libhtp.spec                                  |    8 ++++++++
 2 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/0001-tests-Fix-building-the-unit-tests.patch b/0001-tests-Fix-building-the-unit-tests.patch
new file mode 100644
index 0000000..f748769
--- /dev/null
+++ b/0001-tests-Fix-building-the-unit-tests.patch
@@ -0,0 +1,24 @@
+From cb8cae03ab75d4bb049efa0d1d2699c182e20f6e Mon Sep 17 00:00:00 2001
+From: Mathieu Bridon <bochecha at daitauha.fr>
+Date: Fri, 12 Dec 2014 19:02:05 +0100
+Subject: [PATCH] tests: Fix building the unit tests
+
+In the package, with don't build the static library. As a result, we
+need to fix the test Makefile to use the shared one.
+---
+ test/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index 027b45c..677d659 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -1,4 +1,4 @@
+-LDADD = $(top_builddir)/htp/.libs/libhtp.a -lz @LIBICONV@ 
++LDADD = $(top_builddir)/htp/.libs/libhtp.la -lz @LIBICONV@
+ AM_CFLAGS = -g -O2
+ AM_CPPFLAGS = -I$(top_srcdir)
+ EXTRA_DIST = run-tests.sh files
+-- 
+2.1.0
+
diff --git a/libhtp.spec b/libhtp.spec
index 6006c52..972f449 100644
--- a/libhtp.spec
+++ b/libhtp.spec
@@ -11,6 +11,8 @@ URL:           http://www.libhtp.org
 #     $ git archive --format=tar --prefix=libhtp-0.3.0/ 0.3.0 | xz -z >libhtp-0.3.0.tar.xz
 Source0:       %{name}-%{version}.tar.xz
 
+Patch0:        0001-tests-Fix-building-the-unit-tests.patch
+
 # Upstream doesn't publish release tarballs yet, so we need the autotools stuff
 BuildRequires: autoconf automake libtool
 
@@ -49,6 +51,8 @@ Documentation (in HTML, Latex and PDF formats) for %{name}.
 %prep
 %setup -q
 
+%patch0 -p1
+
 
 %build
 # Upstream doesn't publish release tarballs yet, so we need to run autoreconf
@@ -75,6 +79,10 @@ find %{buildroot} -name '*.la' -exec rm -f '{}' \;
 %postun -p /sbin/ldconfig
 
 
+%check
+make check
+
+
 %files
 %doc AUTHORS COPYING LICENSE NOTICE README
 %{_libdir}/%{name}*.so.*


More information about the scm-commits mailing list