summaryrefslogtreecommitdiff
path: root/tests/offsets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/offsets')
-rw-r--r--tests/offsets/Makefile.am22
-rwxr-xr-xtests/offsets/gen-gitestoffsets2
-rw-r--r--tests/offsets/offsets.h3
3 files changed, 13 insertions, 14 deletions
diff --git a/tests/offsets/Makefile.am b/tests/offsets/Makefile.am
index 4f03830e..a3ec78b1 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,29 @@ 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
+LOG_COMPILER = env GI_TYPELIB_PATH=:$(top_builddir) ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected && \
+ diff -u offsets.compiled offsets.introspected && echo
CLEANFILES += offsets.compiled offsets.introspected
diff --git a/tests/offsets/gen-gitestoffsets b/tests/offsets/gen-gitestoffsets
index 60efa439..77351060 100755
--- a/tests/offsets/gen-gitestoffsets
+++ b/tests/offsets/gen-gitestoffsets
@@ -209,8 +209,6 @@ output({}, r'''
| if (argc != 3)
| g_error ("Usage: gitestoffsets COMPILED_OFFSETS_FILE INTROSPECTED_OFFSETS_FILE");
|
-| g_type_init ();
-|
| repository = g_irepository_get_default ();
| if (!g_irepository_require (repository, namespace, version, 0, &error))
| g_error ("Failed to load %%s-%%s.typelib: %%s", namespace, version, error->message);
diff --git a/tests/offsets/offsets.h b/tests/offsets/offsets.h
index 1985f39a..7bdc1ad7 100644
--- a/tests/offsets/offsets.h
+++ b/tests/offsets/offsets.h
@@ -119,8 +119,7 @@ struct _OffsetsArray
gpointer some_ptrs[5];
};
-/** Test object offsets
- */
+/* Test object offsets */
typedef struct _OffsetsObj OffsetsObj;
typedef struct _OffsetsObjClass OffsetsObjClass;