parsing: improve parsing of arguments
[gtk-doc.git] / tests / tools.sh.in
blob95c5fca1a5745fe709bbeb8910f9d94196cdc706
1 #!/bin/sh
3 suite="tools"
5 failed=0
6 tested=0
8 echo "Running suite(s): gtk-doc-$suite";
10 # we can use which here as we override the path in TEST_ENVIRONMENT
12 # test perl scripts
13 for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj gtkdoc-scanobj ; do
14 @PERL@ -cwT `which $file`
15 if test $? = 1 ; then failed=$(($failed + 1)); fi
16 tested=$(($tested + 1))
17 done
20 # test shell scripts
21 for file in gtkdoc-mkhtml gtkdoc-mkman gtkdoc-mkpdf gtkdocize; do
22 sh -n `which $file`
23 if test $? != 0 ; then failed=$(($failed + 1)); fi
24 tested=$(($tested + 1))
25 done
28 # test xsl files
29 for file in $ABS_TOP_SRCDIR/*.xsl; do
30 xmllint --noout --noent $file
31 if test $? != 0 ; then failed=$(($failed + 1)); fi
32 tested=$(($tested + 1))
33 done
35 # summary
37 rate=$((100*($tested - $failed)/$tested));
38 echo "$rate %: Checks $tested, Failures: $failed"
40 test $failed = 0
41 exit $?