diff --git a/miniupnpd/Makefile.linux b/miniupnpd/Makefile.linux index eb9bf66..3d44ca2 100644 --- a/miniupnpd/Makefile.linux +++ b/miniupnpd/Makefile.linux @@ -75,10 +75,14 @@ NETFILTER_SCRIPTS = $(addprefix $(SRCDIR)/netfilter/, \ #LDLIBS += -lnfnetlink -EXECUTABLES = miniupnpd testupnpdescgen testgetifstats \ - testupnppermissions miniupnpdctl testgetifaddr \ - testgetroute testasyncsendto testportinuse \ - testssdppktgen testminissdp +EXECUTABLES = miniupnpd miniupnpdctl + +ifeq ($(TESTS), 1) +EXECUTABLES += testupnpdescgen testgetifstats \ + testupnppermissions testgetifaddr \ + testgetroute testasyncsendto testportinuse \ + testssdppktgen testminissdp +endif .PHONY: all clean install dox diff --git a/miniupnpd/Makefile.linux_nft b/miniupnpd/Makefile.linux_nft index 268cc31..9e18cdc 100644 --- a/miniupnpd/Makefile.linux_nft +++ b/miniupnpd/Makefile.linux_nft @@ -68,11 +68,14 @@ NFT_SCRIPTS = $(addprefix $(SRCDIR)/netfilter_nft/scripts/, \ #LDLIBS += -lnfnetlink -EXECUTABLES = miniupnpd miniupnpdctl \ - testupnpdescgen testgetifstats \ - testupnppermissions testgetifaddr \ - testgetroute testasyncsendto testportinuse \ - testssdppktgen testminissdp +EXECUTABLES = miniupnpd miniupnpdctl + +ifeq ($(TESTS), 1) +EXECUTABLES += testupnpdescgen testgetifstats \ + testupnppermissions testgetifaddr \ + testgetroute testasyncsendto testportinuse \ + testssdppktgen testminissdp +endif .PHONY: all clean install dox diff --git a/miniupnpd/configure b/miniupnpd/configure index f3183eb..8b2323c 100755 --- a/miniupnpd/configure +++ b/miniupnpd/configure @@ -30,8 +30,11 @@ if [ -z "$HTTPS_KEYFILE" ] ; then HTTPS_KEYFILE=/etc/miniupnpd/private-key.pem fi +TESTS=1 + for argv; do case "$argv" in + --disable-tests) TESTS=0 ;; --ipv6) IPV6=1 ;; --igd2) IGD2=1 ;; --strict) STRICT=1 ;; @@ -96,6 +99,7 @@ case "$argv" in echo " --host-os= For cross build. result of uname -s on the host machine" echo " --host-os-version=x.x For cross build. result of uname -r on the host machine" echo " --host-machine= For cross build. result of uname -m on the host machine" + echo " --disable-tests Do not build tests" exit 1 ;; *) @@ -592,6 +596,7 @@ if [ "$FW" = "iptables" ] || [ "$FW" = "nftables" ] ; then echo "# generated by $0 on `date`" > ${CONFIG_MK} echo "SRCDIR = ${BASEDIR}" >> ${CONFIG_MK} echo "CPPFLAGS += -I." >> ${CONFIG_MK} + echo "TESTS = ${TESTS}" >> ${CONFIG_MK} if [ "$PKG_CONFIG" ] ; then if pkg_detect libcap-ng; then