More shell calls to all our tests
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 5 Dec 2010 14:47:18 +0000 (15:47 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 5 Dec 2010 14:47:18 +0000 (15:47 +0100)
 - look up all our staticaly coded mimetypes from randomly generated filenames
 - read all contents we find across all test mimecontainers.

libcitadel/tests/run_tests.sh

index 0c74dc78204dd7c4d7e55108b4833b6615b208a6..d5f9ca21d0a0ea97ee3745dca3c83d10df150f45 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/bash
 
+RUN_TEST=
 
 #./stringbuf_IO_test -p 6666 -i 0.0.0.0 -s 2 -l 50
 
 
 
 echo running hashlist test
-./hashlist_test
+$RUN_TEST ./hashlist_test
 
 echo running strbuf conversion tests
 
 ./stringbuf_conversion_test
-cat testdata/emailaddresses/email_recipientstrings.txt |stringbuf_conversion_test -i
+cat testdata/emailaddresses/email_recipientstrings.txt |$RUN_TEST stringbuf_conversion_test -i
 
 echo running general stringbuffer tests
-./stringbuf_test
+$RUN_TEST ./stringbuf_test
 
 
 echo running mimeparser tests
 
 for i in testdata/mime/*; do 
-       ./mimeparser_test -p -f $i
-       ./mimeparser_test -p -d -f $i
+       $RUN_TEST ./mimeparser_test -p -f $i
+       $RUN_TEST ./mimeparser_test -p -d -f $i
+       for j in `./mimeparser_test -p -d -f $i |grep part=|sed "s;part=.*|.*|\([0-9\.]*\)|.*|.*|.*|.*|;\1;"`; do 
+           $RUN_TEST ./mimeparser_test -p -d -f $i -P $j > /dev/null
+       done
 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
+    $RUN_TEST ./mime_xdg_lookup_test -f $i -x -i /usr/share/icons/gnome/24x24/mimetypes
+    $RUN_TEST ./mime_xdg_lookup_test -f $i -i /usr/share/icons/gnome/24x24/mimetypes
+done
+
+for i in test.txt test.css test.htc test.jpg test.png test.ico test.vcf test.html test.htm test.wml test.wmls test.wmlc test.wmlsc test.wbmp test.blarg a.1 a; do 
+    $RUN_TEST ./mime_xdg_lookup_test -f $i -x -i /usr/share/icons/gnome/24x24/mimetypes
+done
+