[vala/staging] build: Use jing to verify generated GIR file, if available



commit 9a8fd34a8caecb222425041beeeb7de4cb98c0cd
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Mar 31 14:36:01 2021 +0200

    build: Use jing to verify generated GIR file, if available

 configure.ac                | 3 +++
 tests/girwriter/Makefile.am | 4 ++++
 2 files changed, 7 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 115b946f9..9d09f4dd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,9 @@ AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes)
 AC_PATH_PROG([G_IR_COMPILER], [g-ir-compiler], :)
 AM_CONDITIONAL(HAVE_G_IR_COMPILER, test "$G_IR_COMPILER" != :)
 
+AC_PATH_PROG([JING], [jing], :)
+AM_CONDITIONAL(HAVE_JING, test "$JING" != :)
+
 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
 
diff --git a/tests/girwriter/Makefile.am b/tests/girwriter/Makefile.am
index f1554d0e7..796f36b6a 100644
--- a/tests/girwriter/Makefile.am
+++ b/tests/girwriter/Makefile.am
@@ -1,4 +1,5 @@
 NULL =
+GIRDIR = $$($(PKG_CONFIG) gobject-introspection-1.0 --variable=girdir)
 
 check-girwriter: $(top_builddir)/compiler/valac
        G_DEBUG=fatal-warnings $(top_builddir)/compiler/valac \
@@ -14,6 +15,9 @@ check-girwriter: $(top_builddir)/compiler/valac
        tail -n +3 GirTest-1.0.gir | diff -wu $(srcdir)/GirTest-1.0.gir-expected - || exit 1;
 if HAVE_G_IR_COMPILER
        $(G_IR_COMPILER) -o GirTest-1.0.typelib GirTest-1.0.gir;
+endif
+if HAVE_JING
+       $(JING) -c -e UTF-8 $(GIRDIR)/gir-1.2.rnc GirTest-1.0.gir || echo "Ignoring above error(s)";
 endif
        rm -f girtest.vapi girtest.c;
        G_DEBUG=fatal-warnings $(top_builddir)/vapigen/vapigen \


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