From: Wilfried Goesgens Date: Thu, 2 Dec 2010 00:18:28 +0000 (+0100) Subject: add scripts to run and test and have code coverage analysis across them. X-Git-Tag: v8.01~543 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=9da04a8c07d11ae44590241c9a17440e39cdadd7;p=citadel.git add scripts to run and test and have code coverage analysis across them. --- diff --git a/libcitadel/tests/dolcov.sh b/libcitadel/tests/dolcov.sh new file mode 100755 index 000000000..f95f4b04f --- /dev/null +++ b/libcitadel/tests/dolcov.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +cd ../lib +CITDIR=`pwd` +OUTDIR=${CITDIR}/../../../coverage/libcitadel + +# if we call citserver with ./citserver, we don't need these: +#cd ${CITDIR}/utillib/; ln -s . utillib; cd .. +#cd ${CITDIR}/modules +#for i in *; do cd $CITDIR/modules/$i; ln -s . modules; ln -s . $i; ln -s ../../user_ops.h .; done + +cd ${CITDIR} +ln -s . lib +mkdir -p ${OUTDIR} +lcov --base-directory ${CITDIR} --directory . --capture --output-file ${OUTDIR}/libcitadel.info $@ +#lcov --base-directory ${CITDIR} --directory ../lib/ --capture --output-file ${OUTDIR}/libcitadel.info $@ + +genhtml --output-directory ${OUTDIR} ${OUTDIR}/libcitadel.info +rm -f lib + diff --git a/libcitadel/tests/run_tests.sh b/libcitadel/tests/run_tests.sh index 426c3794f..0c74dc782 100755 --- a/libcitadel/tests/run_tests.sh +++ b/libcitadel/tests/run_tests.sh @@ -4,23 +4,48 @@ #./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s 2 -l 50 -./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -b55 & -cat posttest_blob.txt |nc 127.0.0.1 6666 +#./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -b55 & +#cat posttest_blob.txt |nc 127.0.0.1 6666 -./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -b482 & -cat posttest_headers.txt |nc 127.0.0.1 6666 +#./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -b482 & +#cat posttest_headers.txt |nc 127.0.0.1 6666 -./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -b537 & -cat posttest.txt |nc 127.0.0.1 6666 +#./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -b537 & +#cat posttest.txt |nc 127.0.0.1 6666 -./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -n1 & -cat posttest_blob.txt |nc 127.0.0.1 6666 +#./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -n1 & +#cat posttest_blob.txt |nc 127.0.0.1 6666 -./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -n13 & -cat posttest_headers.txt |nc 127.0.0.1 6666 +#./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -n13 & +#cat posttest_headers.txt |nc 127.0.0.1 6666 -./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -n14 & -cat posttest.txt |nc 127.0.0.1 6666 +#./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s2 -n14 & +#cat posttest.txt |nc 127.0.0.1 6666 -posttest.txt + +echo running hashlist test +./hashlist_test + +echo running strbuf conversion tests + +./stringbuf_conversion_test +cat testdata/emailaddresses/email_recipientstrings.txt |stringbuf_conversion_test -i + +echo running general stringbuffer tests +./stringbuf_test + + +echo running mimeparser tests + +for i in testdata/mime/*; do + ./mimeparser_test -p -f $i + ./mimeparser_test -p -d -f $i +done + +echo running XDG-mimetype lookup tests + +for i in ../../webcit/static/bgcolor.gif ../../webcit/static/resizecorner.png ../../webcit/static/roomops.js ./mimeparser_test.c; do + ./mime_xdg_lookup_test -f $i -x + ./mime_xdg_lookup_test -f $i +done \ No newline at end of file