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

73 lines
1.3 KiB
Makefile

OPT = -O2
DEBUG = 2
CFLAGS = -I../include -Wall -std=c99 ${OPT}
LDFLAGS = -L../lib
LOADLIBES = -lpsyc -lm
TARGETS = testServer testParser testMatch testRender testText isRoutingVar getVarType
WRAPPER =
DIET = diet
PORT = 4440
all: ${TARGETS}
diet: WRAPPER = ${DIET}
diet: all
debug: CFLAGS += -DDEBUG=${DEBUG} -g
debug: CFLAGS := $(subst ${OPT},-O0,${CFLAGS})
debug: all
clean:
rm -f ${TARGETS}
it: all
test: ${TARGETS}
./testRender
./testMatch
./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
nettest: nettestfull nettestsplit
nettestfull:
for f in packets/[0-9]*; do echo ">> $$f"; cat $$f | nc localhost ${PORT} | diff -u $$f -; done
nettestsplit:
for f in packets/[0-9]*; do echo ">> $$f"; ./splittest.pl $$f ${PORT} | diff -u $$f -; done
nettesterr:
for f in packets/err-*; do echo ">> $$f"; cat $$f | nc localhost ${PORT}; done
netstart:
./testServer ${PORT}
netstartr:
./testServer ${PORT} -r
netstartv:
./testServer ${PORT} -v
netstartrv:
./testServer ${PORT} -rv
netstartm:
./testServer ${PORT} -m
netstartmr:
./testServer ${PORT} -mr
netstartms:
./testServer ${PORT} -ms
netstartmsp:
./testServer ${PORT} -msp
netstartmv:
./testServer ${PORT} -mv
netstartmrv:
./testServer ${PORT} -mrv