[gtk-doc] tests: Fix sanity.sh lines count when devhelp2.gz warning is restored



commit 4e5429c9b4d8197bc27c145b7744de1b64d698eb
Author: Alban Browaeys <alban browaeys gmail com>
Date:   Wed Nov 1 23:27:06 2017 +0100

    tests: Fix sanity.sh lines count when devhelp2.gz warning is restored
    
    Do so by discarding references to this warning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789649

 tests/sanity.sh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/tests/sanity.sh b/tests/sanity.sh
index 1db182f..24e519d 100755
--- a/tests/sanity.sh
+++ b/tests/sanity.sh
@@ -82,7 +82,12 @@ if test $nok -gt 0 ; then failed=`expr $failed + 1`; fi
 tested=`expr $tested + 1`
 
 # check that log files have only one line (the command)
+# discard references to launchapd bugs
 nok=0
+DISCARD_PATTERN='Please fix https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/[0-9]* . For now run:
+gunzip .*.gz
+
+'
 for file in $dir/*/docs/gtkdoc-*.log; do
   expected_lines="1"
   # adjust for known files
@@ -101,7 +106,7 @@ for file in $dir/*/docs/gtkdoc-*.log; do
     ;;
   esac
 
-  lines=`wc -l $file | cut -d' ' -f1`
+  lines=`grep -v -x -G -e "$DISCARD_PATTERN" $file | wc -l | 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`;


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