pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mosquitto: Enable tests
Module Name: pkgsrc-wip
Committed By: Greg Troxel <gdt%lexort.com@localhost>
Pushed By: gdt
Date: Sat Apr 27 21:15:54 2019 -0400
Changeset: 891232467a273c55538f6685b711724d3b17a371
Modified Files:
mosquitto/Makefile
mosquitto/distinfo
mosquitto/patches/patch-CMakeLists.txt
Added Files:
mosquitto/patches/patch-lib_util__mosq.c
Log Message:
mosquitto: Enable tests
The tests fail, but at least begin to run.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=891232467a273c55538f6685b711724d3b17a371
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
mosquitto/Makefile | 9 ++++-----
mosquitto/distinfo | 3 ++-
mosquitto/patches/patch-CMakeLists.txt | 6 +++++-
mosquitto/patches/patch-lib_util__mosq.c | 25 +++++++++++++++++++++++++
4 files changed, 36 insertions(+), 7 deletions(-)
diffs:
diff --git a/mosquitto/Makefile b/mosquitto/Makefile
index fd717448be..ac1e6eb284 100644
--- a/mosquitto/Makefile
+++ b/mosquitto/Makefile
@@ -20,17 +20,16 @@ USE_TOOLS+= gmake
CMAKE_ARGS+= -DCMAKE_INSTALL_SYSCONFDIR=${PREFIX}/share/examples
-# config.mk is in theory used by only the non-cmake build. Remove it,
-# to force a failure if it somehow becomes used.
-pre-configure:
- ${RM} ${WRKSRC}/config.mk
-
# \todo Resolve what is an example vs. what might be used.
CONF_FILES= ${PREFIX}/share/examples/mosquitto/pskfile.example \
${PREFIX}/share/examples/mosquitto/pwfile.example \
${PREFIX}/share/examples/mosquitto/mosquitto.conf \
${PREFIX}/share/examples/mosquitto/aclfile.example
+# Fails; see https://github.com/eclipse/mosquitto/issues/1242
+TEST_TARGET= test
+.include "../../devel/cunit/buildlink3.mk"
+
.include "../../devel/libuuid/buildlink3.mk"
.include "../../devel/uthash/buildlink3.mk"
# ?needed
diff --git a/mosquitto/distinfo b/mosquitto/distinfo
index bca847224d..b4ddfed159 100644
--- a/mosquitto/distinfo
+++ b/mosquitto/distinfo
@@ -4,7 +4,8 @@ SHA1 (mosquitto-1.6.1.tar.gz) = 0d8684782daffb9dd2f084acccc103735965e21a
RMD160 (mosquitto-1.6.1.tar.gz) = 1e585bd941cfee635be28554a735ac903d7cbc9b
SHA512 (mosquitto-1.6.1.tar.gz) = 64a9a5ea9a9f28f13d1a730c69445fb56a196e151dbcf1a003060e878a8615aa18235723440740e9fe5c6e8503130a99b58766aa131b1a19f0ba593342026f3f
Size (mosquitto-1.6.1.tar.gz) = 575753 bytes
-SHA1 (patch-CMakeLists.txt) = d4f4e7e6fe866155832b2fe64d861ce7cec9b09f
+SHA1 (patch-CMakeLists.txt) = bb50a613e72ab2052a2b1dfeffa6173ad5bbceb5
SHA1 (patch-lib_CMakeLists.txt) = cddb8803a759820c8059028f924b56c22689ee54
+SHA1 (patch-lib_util__mosq.c) = 3c0c01bd4bbfa838a3e2206485d63df7c2857eaf
SHA1 (patch-mosquitto.conf) = 3db0e0bb4ca25bb12f539b604a957453268712bf
SHA1 (patch-src_CMakeLists.txt) = 2346ee3f13ab7f7e2c34492a4271e0b1adcae4fb
diff --git a/mosquitto/patches/patch-CMakeLists.txt b/mosquitto/patches/patch-CMakeLists.txt
index 78fb29e765..46923be6a6 100644
--- a/mosquitto/patches/patch-CMakeLists.txt
+++ b/mosquitto/patches/patch-CMakeLists.txt
@@ -6,7 +6,7 @@ Sent upstream via email 20190427.
--- CMakeLists.txt.orig 2019-04-26 16:07:59.000000000 +0000
+++ CMakeLists.txt
-@@ -108,9 +114,9 @@ install(FILES mosquitto.conf aclfile.exa
+@@ -108,12 +108,12 @@ install(FILES mosquitto.conf aclfile.exa
# ========================================
configure_file(libmosquitto.pc.in libmosquitto.pc @ONLY)
@@ -18,3 +18,7 @@ Sent upstream via email 20190427.
# ========================================
# Testing
+ # ========================================
+ enable_testing()
+-add_test("test" make -C ${mosquitto_SOURCE_DIR}/test test)
++add_test("test" gmake -C ${mosquitto_SOURCE_DIR}/test test)
diff --git a/mosquitto/patches/patch-lib_util__mosq.c b/mosquitto/patches/patch-lib_util__mosq.c
new file mode 100644
index 0000000000..9a7eb4c1a6
--- /dev/null
+++ b/mosquitto/patches/patch-lib_util__mosq.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+Something in the tests breaks because __GLIBC_PREREQ is not defined.
+See https://github.com/eclipse/mosquitto/issues/1242
+
+--- lib/util_mosq.c.orig 2019-04-26 16:07:59.000000000 +0000
++++ lib/util_mosq.c
+@@ -29,7 +29,7 @@ Contributors:
+ #endif
+
+ #if !defined(WITH_TLS) && defined(__linux__)
+-# if defined(__GLIBC__) && __GLIBC_PREREQ(2, 25)
++# if defined(__GLIBC__)
+ # include <sys/random.h>
+ # endif
+ #endif
+@@ -325,7 +325,7 @@ int util__random_bytes(void *bytes, int
+ if(RAND_bytes(bytes, count) == 1){
+ rc = MOSQ_ERR_SUCCESS;
+ }
+-#elif defined(__GLIBC__) && __GLIBC_PREREQ(2, 25)
++#elif defined(__GLIBC__)
+ if(getrandom(bytes, count, 0) == 0){
+ rc = MOSQ_ERR_SUCCESS;
+ }
Home |
Main Index |
Thread Index |
Old Index