1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

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 ${MAKE} -C test debug
test: all test: all
${MAKE} -C test test ${MAKE} -C test test nettest
${MAKE} -C test nettest
${MAKE} -C test nettestr
doc: doc:
doxygen doxygen

View file

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