mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
test: makefile improvements
This commit is contained in:
parent
5d2b33fb76
commit
16fdc8691a
2 changed files with 16 additions and 15 deletions
4
Makefile
4
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue