[gtk-doc] tests: improve the sanity test



commit f7a53326d454403c56fc1a074f3f20f494a8f246
Author: Stefan Kost <ensonic users sf net>
Date:   Wed May 11 12:11:16 2011 +0300

    tests: improve the sanity test
    
    Print the file and check on failure. Check devhelp2 files too.

 tests/sanity.sh |   34 ++++++++++++++++++++++++++++------
 1 files changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/tests/sanity.sh b/tests/sanity.sh
index 829d350..7ce47f5 100755
--- a/tests/sanity.sh
+++ b/tests/sanity.sh
@@ -11,21 +11,41 @@ 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
-  if test ! -s $path/index.html ; then nok=$(($nok + 1)); break; fi
-  if test ! -s $path/index.sgml ; then nok=$(($nok + 1)); break; fi
-  if test ! -s $path/home.png ; then nok=$(($nok + 1)); break; fi
+  if test ! -s $path/index.html ; then
+    echo 1>&2 "no or empty $path/index.html"
+    nok=$(($nok + 1)); break;
+  fi
+  if test ! -s $path/index.sgml ; then
+    echo 1>&2 "no or empty $path/index.sgml"
+    nok=$(($nok + 1)); break;
+  fi
+  if test ! -s $path/home.png ; then
+    echo 1>&2 "no or empty $path/home.png"
+    nok=$(($nok + 1)); break;
+  fi
+  file=`echo $path/*.devhelp2`
+  if test ! -s $file ; then
+    echo 1>&2 "no or empty $file"
+    nok=$(($nok + 1)); break;
+  fi
 done
 if test $nok -gt 0 ; then failed=$(($failed + 1)); fi
 tested=$(($tested + 1))
 
 
-# check online tags
+# check online/anchor tags
 nok=0
 for file in $dir/*/docs*/html/index.sgml; do
   grep >/dev/null "<ONLINE href=" $file
-  if test $? = 1 ; then nok=$(($nok + 1)); break; fi
+  if test $? = 1 ; then
+    echo 1>&2 "missing ONLINE reference in $file"
+    nok=$(($nok + 1)); break;
+  fi
   grep >/dev/null "<ANCHOR id=" $file
-  if test $? = 1 ; then nok=$(($nok + 1)); break; fi
+  if test $? = 1 ; then
+    echo 1>&2 "missing ANCHOR reference in $file"
+    nok=$(($nok + 1)); break;
+  fi
 done
 if test $nok -gt 0 ; then failed=$(($failed + 1)); fi
 tested=$(($tested + 1))
@@ -36,6 +56,7 @@ nok=0
 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"
     nok=$(($nok + 1));
   fi
 done
@@ -48,6 +69,7 @@ nok=0
 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"
     nok=$(($nok + 1));
   fi
 done



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