give regress tests a chance to run again

This commit is contained in:
jasper 2020-06-10 10:05:20 +00:00
parent 79ca9817a4
commit 9fed53b558
5 changed files with 70 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.30 2020/06/10 07:39:56 jasper Exp $
# $OpenBSD: Makefile,v 1.31 2020/06/10 10:05:20 jasper Exp $
COMMENT = opensource MQTT broker
@ -39,16 +39,17 @@ CONFIGURE_ARGS += -DWITH_TLS_PSK=no
CFLAGS += -I${LOCALBASE}/include
TEST_DEPENDS= ${MODPY_RUN_DEPENDS} \
devel/cunit \
devel/gmake
pre-test:
ln -fs ${MODPY_BIN} ${WRKDIR}/bin/python
ln -fs ${WRKBUILD}/src/mosquitto ${WRKSRC}/src/
${SUBST_CMD} ${WRKSRC}/test/unit/Makefile
do-test:
cd ${WRKSRC}/test; env ${MAKE_ENV} \
WRKLIB=${WRKBUILD}/lib/libmosquitto.so.${LIBmosquitto_VERSION} \
WRKLIBPP=${WRKBUILD}/lib/cpp/libmosquittopp.so.${LIBmosquittopp_VERSION} \
gmake WITH_TLS_PSK=no test
LDFLAGS="-L${LOCALBASE}/lib" gmake WITH_TLS_PSK=no test
.include <bsd.port.mk>

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-test_broker_c_Makefile,v 1.6 2020/06/10 10:05:20 jasper Exp $
Index: test/broker/c/Makefile
--- test/broker/c/Makefile.orig
+++ test/broker/c/Makefile
@@ -30,7 +30,7 @@ ${PLUGINS} : %.so: %.c
${TESTS} : %.test: %.c
- $(CC) ${CFLAGS} $< -o $@ ../../../lib/libmosquitto.so.1
+ $(CC) ${CFLAGS} $< -o $@ ${WRKLIB}
reallyclean : clean

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-test_lib_c_Makefile,v 1.3 2020/06/10 10:05:20 jasper Exp $
Index: test/lib/c/Makefile
--- test/lib/c/Makefile.orig
+++ test/lib/c/Makefile
@@ -1,7 +1,7 @@
.PHONY: all clean reallyclean
CFLAGS=-I../../../lib -Werror
-LIBS=../../../lib/libmosquitto.so.1
+LIBS=${WRKLIB}
SRC = \
01-con-discon-success.c \

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-test_lib_cpp_Makefile,v 1.3 2020/06/10 10:05:20 jasper Exp $
Index: test/lib/cpp/Makefile
--- test/lib/cpp/Makefile.orig
+++ test/lib/cpp/Makefile
@@ -1,7 +1,7 @@
.PHONY: all test 01 02 03 04 08 09 clean reallyclean
CFLAGS=-I../../../lib -I../../../lib/cpp -DDEBUG
-LIBS=../../../lib/libmosquitto.so.1 ../../../lib/cpp/libmosquittopp.so.1
+LIBS=${WRKLIB} ${WRKLIBPP}
all : 01 02 03 04 08 09

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-test_unit_Makefile,v 1.1 2020/06/10 10:05:20 jasper Exp $
- disable coverage tests (undefined references)
- fix LDFLAGS for cunit
Index: test/unit/Makefile
--- test/unit/Makefile.orig
+++ test/unit/Makefile
@@ -1,13 +1,13 @@
include ../../config.mk
-.PHONY: all check test test-broker test-lib clean coverage
+.PHONY: all check test test-broker test-lib clean
CPPFLAGS:=$(CPPFLAGS) -I../.. -I../../lib -I../../src
ifeq ($(WITH_BUNDLED_DEPS),yes)
CPPFLAGS:=$(CPPFLAGS) -I../../src/deps
endif
-CFLAGS:=$(CFLAGS) -coverage -Wall -ggdb
+CFLAGS:=$(CFLAGS) -Wall -ggdb
LDFLAGS:=$(LDFLAGS) -coverage
LDADD:=$(LDADD) -lcunit