mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-27 06:34:59 +00:00
miniupnpd: configure, Makefile: make tests optional
Tests confuse compilation-database-driven code analysis tools (specifically, some tests stub out certain functions and the stubs sometimes get preferred over real definitions). So, make them optional.
This commit is contained in:
parent
0ab27a2a32
commit
eb3cf72900
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
5
miniupnpd/configure
vendored
5
miniupnpd/configure
vendored
@ -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=<name> 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=<arch> 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user