[gtk-doc] tests: skip some checks if no gobject docs are installed



commit 2d277206b7eb1f315a045ac999e5cabbd2006910
Author: Stefan Sauer <ensonic users sf net>
Date:   Tue Jul 19 21:39:28 2016 +0200

    tests: skip some checks if no gobject docs are installed
    
    Skip tests that check fixxrefs logs if gobject docs are not installed.
    Fixes #768675

 tests/Makefile.am |    3 ++-
 tests/sanity.sh   |   10 +++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5d1d2d6..83c5c4e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -14,7 +14,8 @@ TESTS_ENVIRONMENT = \
        ABS_TOP_BUILDDIR=$(abs_top_builddir) \
        ABS_TOP_SRCDIR=$(abs_top_srcdir) \
        PATH=$(abs_top_builddir):$(srcdir):$(PATH) \
-       PERL5LIB=$(abs_top_builddir):$(PERL5LIB)
+       PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
+       GLIB_PREFIX="$(glib_prefix)"
 
 endif
 
diff --git a/tests/sanity.sh b/tests/sanity.sh
index 30ceaf4..650258b 100755
--- a/tests/sanity.sh
+++ b/tests/sanity.sh
@@ -81,7 +81,7 @@ 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)
+# check that log files have only one line (the command)
 nok=0
 for file in $dir/*/docs/gtkdoc-*.log; do
   expected_lines="1"
@@ -92,6 +92,14 @@ for file in $dir/*/docs/gtkdoc-*.log; do
   if test $file == "$dir/gobject/docs/gtkdoc-fixxref.log"; then
     expected_lines="2"
   fi
+  case $file in
+  *gtkdoc-fixxref.log)
+    # if there is no /usr/share/gtk-doc/html/gobject we should skip fixxref logs
+    if test ! -d "$GLIB_PREFIX/share/gtk-doc/html/gobject"; then
+      continue
+    fi
+    ;;
+  esac
 
   lines=`wc -l $file | cut -d' ' -f1`
   if test $lines -gt $expected_lines; then


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