summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2019-09-08 21:42:57 +0200
committerStefan Sauer <ensonic@users.sf.net>2019-09-08 21:42:57 +0200
commit51e19ce72c11241c8dd81812631e5f20b3de645e (patch)
treee392d476db090431fd77aced89c79fd08a248531 /tests
parentee4ff251f1de101988687692af0eb292882227b2 (diff)
downloadgtk-doc-51e19ce72c11241c8dd81812631e5f20b3de645e.tar.gz
mkdb: only output object_index.sgml if not empty
Only output the index if the library provices gobjects. We already do this for the tree_index.sgml.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/sanity.sh24
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/sanity.sh b/tests/sanity.sh
index 8c1f2a8..68db064 100755
--- a/tests/sanity.sh
+++ b/tests/sanity.sh
@@ -56,17 +56,19 @@ if test $nok -gt 0 ; then failed=`expr $failed + 1`; fi
tested=`expr $tested + 1`
-# check validity of generated sgml files
-nok=0
-for file in $dir/$suite/docs/xml/*.sgml; do
- xmllint --noout --noent $file
- if test $? != 0 ; then
- echo 1>&2 "sgml validity check failed for $file"
- nok=`expr $nok + 1`;
- fi
-done
-if test $nok -gt 0 ; then failed=`expr $failed + 1`; fi
-tested=`expr $tested + 1`
+# check validity of generated sgml files (if any)
+if ls $dir/$suite/docs/xml/*.sgml 1> /dev/null 2>&1; then
+ nok=0
+ for file in $dir/$suite/docs/xml/*.sgml; do
+ xmllint --noout --noent $file
+ if test $? != 0 ; then
+ echo 1>&2 "sgml validity check failed for $file"
+ nok=`expr $nok + 1`;
+ fi
+ done
+ if test $nok -gt 0 ; then failed=`expr $failed + 1`; fi
+ tested=`expr $tested + 1`
+fi
# check validity of devhelp2 files
nok=0