minissdpd: add "make check"
This commit is contained in:
parent
b55ecd70ef
commit
1c84e560ac
|
@ -27,7 +27,7 @@ compiler:
|
||||||
script:
|
script:
|
||||||
- 'cd $TRAVIS_BUILD_DIR && cd $PROJECT'
|
- 'cd $TRAVIS_BUILD_DIR && cd $PROJECT'
|
||||||
- 'MAKEFILE=Makefile && if [ -a Makefile.linux ]; then MAKEFILE=Makefile.linux; fi'
|
- 'MAKEFILE=Makefile && if [ -a Makefile.linux ]; then MAKEFILE=Makefile.linux; fi'
|
||||||
- 'make -f $MAKEFILE -j3 && if [ "$PROJECT" = "miniupnpc" ]; then make -f $MAKEFILE check; fi'
|
- 'make -f $MAKEFILE -j3 && if [ "$PROJECT" = "miniupnpc" -o "$PROJECT" = "minissdpd" ]; then make -f $MAKEFILE check; fi'
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- 'make -f $MAKEFILE install'
|
- 'make -f $MAKEFILE install'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: Makefile,v 1.23 2014/12/06 10:54:01 nanard Exp $
|
# $Id: Makefile,v 1.25 2015/08/06 10:17:52 nanard Exp $
|
||||||
# MiniUPnP project
|
# MiniUPnP project
|
||||||
# author: Thomas Bernard
|
# author: Thomas Bernard
|
||||||
# website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
# website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||||
|
@ -43,10 +43,12 @@ SBININSTALLDIR = $(INSTALLPREFIX)/sbin
|
||||||
MANINSTALLDIR = $(INSTALLPREFIX)/share/man
|
MANINSTALLDIR = $(INSTALLPREFIX)/share/man
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all clean install depend
|
.PHONY: all clean install depend check test
|
||||||
|
|
||||||
all: $(EXECUTABLES)
|
all: $(EXECUTABLES)
|
||||||
|
|
||||||
|
test: check
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(ALLOBJS) $(EXECUTABLES)
|
$(RM) $(ALLOBJS) $(EXECUTABLES)
|
||||||
|
|
||||||
|
@ -60,6 +62,12 @@ ifneq ($(OS), Darwin)
|
||||||
$(INSTALL) minissdpd.init.d.script $(PREFIX)/etc/init.d/minissdpd
|
$(INSTALL) minissdpd.init.d.script $(PREFIX)/etc/init.d/minissdpd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
check: validateminissdpd
|
||||||
|
|
||||||
|
validateminissdpd: testminissdpd minissdpd
|
||||||
|
./testminissdpd.sh
|
||||||
|
touch $@
|
||||||
|
|
||||||
minissdpd: $(MINISSDPDOBJS)
|
minissdpd: $(MINISSDPDOBJS)
|
||||||
|
|
||||||
testminissdpd: $(TESTMINISSDPDOBJS)
|
testminissdpd: $(TESTMINISSDPDOBJS)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# $Id: testminissdpd.sh,v 1.1 2015/08/06 10:17:51 nanard Exp $
|
||||||
|
# (c) 2015 Thomas Bernard
|
||||||
|
|
||||||
|
IF=lo
|
||||||
|
SOCKET=`mktemp`
|
||||||
|
PID="${SOCKET}.pid"
|
||||||
|
./minissdpd -s $SOCKET -p $PID -i $IF || exit 1
|
||||||
|
./testminissdpd -s $SOCKET || exit 2
|
||||||
|
kill `cat $PID`
|
Loading…
Reference in New Issue