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

57 lines
1.2 KiB
Makefile
Raw Normal View History

2011-04-30 13:42:48 +00:00
OPT = -O2
DEBUG = 2
CFLAGS = -I../include -Wall -std=c99 ${OPT}
2011-04-30 13:42:48 +00:00
LDFLAGS = -L../lib
LOADLIBES = -lpsyc -lm
2011-05-03 20:18:35 +00:00
TARGETS = testServer testParser testMatch testRender testText isRoutingVar getVarType
2011-04-30 13:42:48 +00:00
WRAPPER =
DIET = diet
PORT = 4440
2011-04-30 14:41:30 +00:00
all: ${TARGETS}
2011-04-30 13:42:48 +00:00
diet: WRAPPER = ${DIET}
diet: all
debug: CFLAGS += -DDEBUG=${DEBUG} -g
debug: CFLAGS := $(subst ${OPT},-O0,${CFLAGS})
debug: all
clean:
rm -f ${TARGETS}
it: all
2011-04-30 13:42:48 +00:00
test: ${TARGETS}
2011-04-25 21:58:07 +00:00
./testRender
./testMatch
./testText
2011-04-25 21:58:07 +00:00
./isRoutingVar
2011-04-29 21:11:48 +00:00
./getVarType
2011-05-04 15:44:12 +00:00
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
2011-04-27 17:18:17 +00:00
2011-05-06 11:32:12 +00:00
# test packet parsing & rendering with the test server
nettest: srvstart pkt pktsplit srvkill
2011-05-06 11:32:12 +00:00
# same test but parse routing headers only
nettestr: srvstartr pkt pktsplit srvkill
pkt:
for f in packets/[0-9]*; do echo ">> $$f"; cat $$f | nc localhost ${PORT} | diff -u $$f -; done
2011-05-06 11:32:12 +00:00
pktsplit:
for f in packets/[0-9]*; do echo ">> $$f"; ./splittest.pl $$f ${PORT} | diff -u $$f -; done
2011-05-06 11:32:12 +00:00
pkterr:
for f in packets/err-*; do echo ">> $$f"; cat $$f | nc localhost ${PORT}; done
2011-05-06 11:32:12 +00:00
srvstart:
./testServer ${PORT} &
2011-04-27 17:18:17 +00:00
2011-05-06 11:32:12 +00:00
srvstartr:
./testServer ${PORT} -r &
2011-04-22 09:50:13 +00:00
2011-05-06 11:32:12 +00:00
srvkill:
killall testServer