[gtk-doc] tests: add a test to check that pdf files are generated



commit e883e7ed202c02cca17dec9b6bbb2065b1085d16
Author: Stefan Sauer <ensonic users sf net>
Date:   Sun Oct 18 20:13:46 2015 +0200

    tests: add a test to check that pdf files are generated
    
    Only run the test if pdf support is enabled.

 tests/sanity.sh |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/tests/sanity.sh b/tests/sanity.sh
index 24b6d95..346cce8 100755
--- a/tests/sanity.sh
+++ b/tests/sanity.sh
@@ -11,7 +11,7 @@ echo "Running suite(s): gtk-doc-$suite";
 
 # check the presence and non-emptyness of certain files
 nok=0
-for path in $dir/*/docs*/html; do
+for path in $dir/*/docs/html; do
   if test ! -s $path/index.html ; then
     echo 1>&2 "no or empty $path/index.html"
     nok=`expr $nok + 1`; break;
@@ -29,10 +29,22 @@ done
 if test $nok -gt 0 ; then failed=`expr $failed + 1`; fi
 tested=`expr $tested + 1`
 
+# TODO: if we have pdf support check for ./tests/*/docs/tester.pdf
+nok=0
+for path in $dir/*/docs; do
+  if test ! -s $path/tester.pdf ; then
+    if ! grep "must be installed to use gtkdoc-mkpdf" $path/gtkdoc-mkpdf.log; then
+      echo 1>&2 "no or empty $path/tester.pdf"
+      nok=`expr $nok + 1`; break;
+    fi
+  fi
+done
+if test $nok -gt 0 ; then failed=`expr $failed + 1`; fi
+tested=`expr $tested + 1`
 
 # check validity of generated xml files
 nok=0
-for file in $dir/*/docs*/xml/*.xml; do
+for file in $dir/*/docs/xml/*.xml; do
   xmllint --noout --noent $file
   if test $? != 0 ; then
     echo 1>&2 "xml validity check failed for $file"
@@ -45,7 +57,7 @@ tested=`expr $tested + 1`
 
 # check validity of generated sgml files
 nok=0
-for file in $dir/*/docs*/xml/*.sgml; do
+for file in $dir/*/docs/xml/*.sgml; do
   xmllint --noout --noent $file
   if test $? != 0 ; then
     echo 1>&2 "sgml validity check failed for $file"
@@ -57,7 +69,7 @@ tested=`expr $tested + 1`
 
 # check validity of devhelp2 files
 nok=0
-for file in $dir/*/docs*/html/*.devhelp2; do
+for file in $dir/*/docs/html/*.devhelp2; do
   xmllint --noout --nonet --schema $ABS_TOP_SRCDIR/devhelp2.xsd $file
   if test $? != 0 ; then
     echo 1>&2 "devhelp2 xml validity check failed for $file"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]