[gtk-doc] tests: add another sanity check



commit ee56123ff7712f1020d91c02d63b25045dc95363
Author: Stefan Sauer <ensonic users sf net>
Date:   Thu Mar 24 13:55:46 2016 +0100

    tests: add another sanity check
    
    Test that the log files only conatin the command and no warnings. Add some
    exceptions.

 tests/sanity.sh |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/tests/sanity.sh b/tests/sanity.sh
index 99236ba..30ceaf4 100755
--- a/tests/sanity.sh
+++ b/tests/sanity.sh
@@ -81,6 +81,26 @@ done
 if test $nok -gt 0 ; then failed=`expr $failed + 1`; fi
 tested=`expr $tested + 1`
 
+# check that log files have only one lien (the command)
+nok=0
+for file in $dir/*/docs/gtkdoc-*.log; do
+  expected_lines="1"
+  # adjust for known files
+  if test $file == "$dir/fail/docs/gtkdoc-mkdb.log"; then
+    expected_lines="16"
+  fi
+  if test $file == "$dir/gobject/docs/gtkdoc-fixxref.log"; then
+    expected_lines="2"
+  fi
+
+  lines=`wc -l $file | cut -d' ' -f1`
+  if test $lines -gt $expected_lines; then
+    echo 1>&2 "expected no more than $expected_lines log line in $file, but got $lines"
+    nok=`expr $nok + 1`;
+  fi
+done
+if test $nok -gt 0 ; then failed=`expr $failed + 1`; fi
+tested=`expr $tested + 1`
 
 # check stability of generated xml/html
 nok=0


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