add scripts to run and test and have code coverage analysis across them.
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 2 Dec 2010 00:18:28 +0000 (01:18 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 2 Dec 2010 00:18:28 +0000 (01:18 +0100)
libcitadel/tests/dolcov.sh [new file with mode: 0755]
libcitadel/tests/run_tests.sh

diff --git a/libcitadel/tests/dolcov.sh b/libcitadel/tests/dolcov.sh
new file mode 100755 (executable)
index 0000000..f95f4b0
--- /dev/null
@@ -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
+
index 426c3794fc568657484c7b90dff938f9660803d4..0c74dc78204dd7c4d7e55108b4833b6615b208a6 100755 (executable)
@@ -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