From aa77c82b822a78a83e644186fe65599dfafa16cf Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 29 Jun 2017 21:10:33 +0200 Subject: [PATCH] rpm: perform tests during packaging --- include/villas/nodes/zeromq.h | 2 +- lib/nodes/zeromq.c | 5 ++++- packaging/rpm/villas-node.spec | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/villas/nodes/zeromq.h b/include/villas/nodes/zeromq.h index a2b91701f..54e880d5b 100644 --- a/include/villas/nodes/zeromq.h +++ b/include/villas/nodes/zeromq.h @@ -34,7 +34,7 @@ #include "node.h" #include "list.h" -#if ZMQ_VERSION_MAJOR >= 4 && ZMQ_VERSION_MINOR >= 2 +#if ZMQ_VERSION_MAJOR > 4 || (ZMQ_VERSION_MAJOR == 4 && ZMQ_VERSION_MINOR >= 2) #define ZMQ_BUILD_DISH 1 #endif diff --git a/lib/nodes/zeromq.c b/lib/nodes/zeromq.c index d0b45804f..cb9540734 100644 --- a/lib/nodes/zeromq.c +++ b/lib/nodes/zeromq.c @@ -21,7 +21,10 @@ *********************************************************************************/ #include -#include + +#if ZMQ_VERSION_MAJOR < 4 || (ZMQ_VERSION_MAJOR == 4 && ZMQ_VERSION_MINOR <= 1) + #include +#endif #include "nodes/zeromq.h" #include "utils.h" diff --git a/packaging/rpm/villas-node.spec b/packaging/rpm/villas-node.spec index 73dfdcfe2..4cb37d382 100644 --- a/packaging/rpm/villas-node.spec +++ b/packaging/rpm/villas-node.spec @@ -47,6 +47,10 @@ rm -rf %{?buildroot} make PREFIX=/usr DESTDIR=%{?buildroot} install make PREFIX=/usr DESTDIR=%{?buildroot} install-doc +%check +make run-unit-tests +make run-integration-tests + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig