test: makefile improvements

This commit is contained in:
tg(x) 2011-05-08 20:17:56 +02:00
parent 527eebe7f5
commit a7b3b22530
2 changed files with 16 additions and 15 deletions

View File

@ -17,9 +17,7 @@ testdebug: debug
${MAKE} -C test debug
test: all
${MAKE} -C test test
${MAKE} -C test nettest
${MAKE} -C test nettestr
${MAKE} -C test test nettest
doc:
doxygen

View File

@ -37,29 +37,32 @@ test: ${TARGETS}
./testText
./isRoutingVar
./getVarType
for f in packets/[0-9]*; do echo ">> $$f"; ./testParser $$f; done
for f in packets/[0-9]*; do echo ">> $$f"; ./testParser $$f -r; done
x=0; for f in packets/[0-9]*; do echo ">> $$f"; ./testParser $$f; x=$$((x+$$?)); done; exit $$x
x=0; for f in packets/[0-9]*; do echo ">> $$f"; ./testParser $$f -r; x=$$((x+$$?)); done; exit $$x
# test packet parsing & rendering with the test server
nettest: srvstart pkt pktsplit srvkill
nettest: nettestfull nettestsplit
# same test but parse routing headers only
nettestr: srvstartr pkt pktsplit srvkill
nettestrun: srvstart pkt srvkill
nettestfull:
${MAKE} nettestrun
${MAKE} nettestrun srv_args=r
nettestsplit:
for n in 1 2 3 4 5; do ${MAKE} nettestrun srv_recvbuf=$$n && ${MAKE} nettestrun srv_args=r srv_recvbuf=$$n || exit $$?; done
pkt:
for f in packets/[0-9]*; do echo ">> $$f"; cat $$f | nc localhost ${PORT} | ${DIFF} -u $$f -; done
x=0; for f in packets/[0-9]*; do echo ">> $$f"; cat $$f | nc localhost ${PORT} | ${DIFF} -u $$f -; x=$$((x+$$?)); done; exit $$x
pktsplit:
for f in packets/[0-9]*; do echo ">> $$f"; ./splittest.pl $$f ${PORT} | ${DIFF} -u $$f -; done
x=0; for f in packets/[0-9]*; do echo ">> $$f"; ./splittest.pl $$f ${PORT} | ${DIFF} -u $$f -; x=$$((x+$$?)); done; exit $$x
pkterr:
for f in packets/err-*; do echo ">> $$f"; cat $$f | nc localhost ${PORT}; done
srvstart:
./testServer ${PORT} &
srvstartr:
./testServer ${PORT} -r &
pkill -x testServer; exit 0
./testServer ${PORT} -${srv_args} ${srv_recvbuf} &
srvkill:
pkill -x testServer