summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2013-12-22 16:20:54 -0800
committerSimon Feltman <sfeltman@src.gnome.org>2014-01-02 14:14:36 -0800
commit80b54bd0daf82e566570c6c952271e74fbb4542e (patch)
tree5b90540c609cf5b249ca1421d95620c7b2a05c70 /tests
parent8787aec7d010b74cdaa7ccdbe11f32ded55fc006 (diff)
downloadgobject-introspection-80b54bd0daf82e566570c6c952271e74fbb4542e.tar.gz
tests: Use Automake test harness for tests/offsets
Replace usage of check-local with the Automake test harness. Change check_ variable usage to EXTRA_ in order to avoid building these dependencies with targeted testing using TESTS= in parent directories. https://bugzilla.gnome.org/show_bug.cgi?id=720713
Diffstat (limited to 'tests')
-rw-r--r--tests/offsets/Makefile.am23
1 files changed, 13 insertions, 10 deletions
diff --git a/tests/offsets/Makefile.am b/tests/offsets/Makefile.am
index 4f03830e..34466f71 100644
--- a/tests/offsets/Makefile.am
+++ b/tests/offsets/Makefile.am
@@ -6,12 +6,12 @@ CLEANFILES =
EXTRA_DIST =
INTROSPECTION_GIRS =
-check_LTLIBRARIES =
-check_PROGRAMS =
+EXTRA_LTLIBRARIES =
+EXTRA_PROGRAMS =
############################################################
-check_LTLIBRARIES += liboffsets.la
+EXTRA_LTLIBRARIES += liboffsets.la
liboffsets_la_SOURCES = \
offsets.h \
@@ -28,27 +28,30 @@ Offsets_1_0_gir_FILES = $(srcdir)/offsets.h $(srcdir)/offsets.c
Offsets_1_0_gir_SCANNERFLAGS = --warn-all --warn-error
INTROSPECTION_GIRS += Offsets-1.0.gir
-CLEANFILES += Offsets-1.0.gir Offsets-1.0.typelib
+CLEANFILES += Offsets-1.0.gir Offsets-1.0.typelib liboffsets.la
############################################################
-check_PROGRAMS += gitestoffsets
+EXTRA_PROGRAMS += gitestoffsets
nodist_gitestoffsets_SOURCES = gitestoffsets.c
gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
gitestoffsets_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
-gitestoffsets.c: gen-gitestoffsets offsets.h
+gitestoffsets.c: gen-gitestoffsets offsets.h Offsets-1.0.typelib
$(AM_V_GEN) $(PYTHON) $(srcdir)/gen-gitestoffsets $(srcdir)/offsets.h > $@ || ( rm -f $@ && false )
EXTRA_DIST += gen-gitestoffsets
BUILT_SOURCES += gitestoffsets.c
-CLEANFILES += gitestoffsets.c
+CLEANFILES += gitestoffsets.c $(EXTRA_PROGRAMS)
############################################################
-check-local: Offsets-1.0.typelib
- GI_TYPELIB_PATH=:$(top_builddir) ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected
- diff -u offsets.compiled offsets.introspected
+# The trailing "echo" in TESTS_ENVIRONMENT is used to ignore automake passing
+# gitestoffsets as we already run this in the same command line.
+TESTS = gitestoffsets
+TESTS_ENVIRONMENT = \
+ GI_TYPELIB_PATH=:$(top_builddir) ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected && \
+ diff -u offsets.compiled offsets.introspected && echo
CLEANFILES += offsets.compiled offsets.introspected