diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2013-12-20 03:38:37 -0800 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-12-29 18:54:21 +0000 |
commit | 3160f642dbed35b4af8e4d9314c60e4a037884c8 (patch) | |
tree | 2518768b956953f7635edee5380c7207b2137d24 /tests/scanner/Makefile.am | |
parent | ce190a6bd3e6f4443eb346745807695aaebe907d (diff) | |
download | gobject-introspection-3160f642dbed35b4af8e4d9314c60e4a037884c8.tar.gz |
tests: Use Automake test harness for scanner diff tests
Add gi-tester script for dispatching various scanner diff tests based on
their target suffix. Hook the dispatcher script into the Automake test
harness which is passed the diff test target name. Remove usage of
check-local which is always run regardless of whether or not the TESTS
variable is set from the command line. This allows for both the ability to
use the harnesses XFAIL_TESTS variable for expected failures as well as
testing of targets individually, for example:
cd tests/scanner
make check TESTS=GtkFrob-1.0.gir
make check TESTS=Regress-1.0-Python
Add Headeronly-1.0-expected.gir for validating the results of the header
only gir creation test.
https://bugzilla.gnome.org/show_bug.cgi?id=720713
Diffstat (limited to 'tests/scanner/Makefile.am')
-rw-r--r-- | tests/scanner/Makefile.am | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am index a1c0ecfa..bf7afc92 100644 --- a/tests/scanner/Makefile.am +++ b/tests/scanner/Makefile.am @@ -67,7 +67,7 @@ endif # .gir --[scanner]-> .typelib GIRS = TYPELIBS = $(GIRS:.gir=.typelib) -CHECKGIRS = $(GIRS:.gir=.gir.check) +CHECKGIRS = $(GIRS) EXPECTEDGIRS = $(GIRS:.gir=-expected.gir) INTROSPECTION_GIRS = $(GIRS) CLEANFILES = $(TYPELIBS) $(GIRS) @@ -141,20 +141,19 @@ Bar_1_0_gir_SCANNERFLAGS = --accept-unprefixed GIRS += Bar-1.0.gir endif -EXTRA_DIST += headeronly.h +EXTRA_DIST += \ + headeronly.h \ + Headeronly-1.0-expected.gir CLEANFILES += Headeronly-1.0.gir Headeronly-1.0.gir: headeronly.h $(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --warn-all --warn-error --reparse-validate --namespace=Headeronly --nsversion=1.0 --header-only --output=$@ $< -%.gir.check: %.gir - @diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo " TEST $*.gir" - if BUILD_DOCTOOL DOCGIRS = Regress-1.0.gir -CHECKDOCS = $(DOCGIRS:.gir=-C.page.check) $(DOCGIRS:.gir=-Python.page.check) $(DOCGIRS:.gir=-Gjs.page.check) $(DOCGIRS:.gir=-sections.txt.page.check) +CHECKDOCS = $(DOCGIRS:.gir=-C) $(DOCGIRS:.gir=-Python) $(DOCGIRS:.gir=-Gjs) $(DOCGIRS:.gir=-sections.txt) MALLARD_DIRS = $(DOCGIRS:.gir=-C) $(DOCGIRS:.gir=-Python) $(DOCGIRS:.gir=-Gjs) -MALLARD_CLEAN = $(DOCGIRS:.gir=-C)/* $(DOCGIRS:.gir=-Python)/* $(DOCGIRS:.gir=-Gjs)/* +MALLARD_CLEAN = $(DOCGIRS:.gir=-C)/* $(DOCGIRS:.gir=-Python)/* $(DOCGIRS:.gir=-Gjs)/* $(DOCGIRS:.gir=-sections.txt) EXPECTED_MALLARD_DIRS = $(MALLARD_DIRS:=-expected) CLEANFILES += $(MALLARD_CLEAN) @@ -173,23 +172,13 @@ CLEANFILES += $(MALLARD_CLEAN) %-sections.txt: %.gir $(AM_V_GEN)$(INTROSPECTION_DOCTOOL) $(INTROSPECTION_DOCTOOL_ARGS) --write-sections-file $*.gir -o $@ -%-C.page.check: %-C - @diff -r -u -w -B -U 10 $(srcdir)/$*-C-expected $(builddir)/$*-C && echo " TEST $*-C" - -%-Python.page.check: %-Python - @diff -r -u -w -B -U 10 $(srcdir)/$*-Python-expected $(builddir)/$*-Python && echo " TEST $*-Python" - -%-Gjs.page.check: %-Gjs - @diff -r -u -w -B -U 10 $(srcdir)/$*-Gjs-expected $(builddir)/$*-Gjs && echo " TEST $*-Gjs" - -%-sections.txt.page.check: %-sections.txt - @diff -u -w -B -U 10 $(srcdir)/$*-sections-expected.txt $*-sections.txt && echo " TEST $*-C" - else CHECKDOCS = endif -check-local: Headeronly-1.0.gir $(CHECKGIRS) $(CHECKDOCS) $(TYPELIBS) +TESTS = Headeronly-1.0.gir $(CHECKGIRS) $(CHECKDOCS) $(TYPELIBS) +TESTS_ENVIRONMENT = srcdir=$(srcdir) top_srcdir=$(top_srcdir) builddir=$(builddir) top_builddir=$(top_builddir) \ + $(top_srcdir)/tests/gi-tester EXTRA_DIST += \ annotationparser/README \ |