tests: add an empty project where we even regenerate the tester-docs.xml
[gtk-doc.git] / tests / tools.sh.in
blob242adcf7f3479927b298c476347970b01b00b910
1 #!/bin/bash
3 failed=0
4 tested=0
6 echo "Running suite(s): gtk-doc-tools";
8 # we can use which here as we override the path in TEST_ENVIRONMENT
10 # test perl scripts
12 for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj gtkdoc-scanobj ; do
13 @PERL@ -cwT `which $file`
14 if test $? = 1 ; then failed=$(($failed + 1)); fi
15 tested=$(($tested + 1))
16 done
19 # 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
24 failed=$(($failed + 1));
25 else
26 echo `which $file`" syntax OK";
28 tested=$(($tested + 1))
29 done
32 # test xsl files
34 for file in $ABS_TOP_BUILDDIR/*.xsl; do
35 xmllint --noout --noent $file
36 if test $? != 0 ; then
37 failed=$(($failed + 1));
38 else
39 echo "$file syntax OK";
41 tested=$(($tested + 1))
42 done
44 # summary
46 rate=$((100*($tested - $failed)/$tested));
47 echo "$rate %: Checks $tested, Failures: $failed"
48 exit `test $failed = 0`;