db2html: more planning for the refentry title
[gtk-doc.git] / tests / tools.sh.in
blob4d301d0712b38ce9fe16cbdb2374a82c0cd206c8
1 #!/bin/sh
3 suite="tools"
5 failed=0
6 tested=0
8 echo "Running suite(s): gtk-doc-$suite";
10 # we use 'which' here as we override the path in TEST_ENVIRONMENT
13 # test shell scripts
14 for file in gtkdocize; do
15 sh -n `which $file`
16 if test $? != 0 ; then failed=`expr $failed + 1`; fi
17 tested=`expr $tested + 1`
18 done
21 # test xsl files
22 for file in $ABS_TOP_SRCDIR/*.xsl; do
23 xmllint --noout --noent $file
24 if test $? != 0 ; then failed=`expr $failed + 1`; fi
25 tested=`expr $tested + 1`
26 done
29 # test python scripts
30 # TODO: also test the module files
31 # TODO: test python 2 and 3 (python3 -mcompileall gtkdoc/*.py)
32 for file in gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml gtkdoc-mkman gtkdoc-mkpdf gtkdoc-rebase gtkdoc-scangobj; do
33 fullfile=`which $file`
34 @PYTHON@ -m py_compile $fullfile
35 if test $? != 0 ; then failed=`expr $failed + 1`; fi
36 tested=`expr $tested + 1`
37 done
40 # summary
41 successes=`expr $tested - $failed`
43 rate=`expr 100 \* $successes / $tested`;
44 echo "$rate %: Checks $tested, Failures: $failed"
46 test $failed = 0
47 exit $?