diff options
| author | Emmanuele Bassi <ebassi@gnome.org> | 2013-08-21 12:07:39 +0100 |
|---|---|---|
| committer | Emmanuele Bassi <ebassi@gnome.org> | 2013-08-21 12:16:48 +0100 |
| commit | 6c3f870f10465602c2570e0ba3d2311587437977 (patch) | |
| tree | 0a9226490c80f03a6bba03b12cd01cda7b13e6e2 /json-glib | |
| parent | edfa380703f289c509a442d2467f1f8cfa189fff (diff) | |
| download | json-glib-6c3f870f10465602c2570e0ba3d2311587437977.tar.gz | |
tests: Use the new TAP support in GTest
Instead of using the old GLib test harness, we should use the newly
added TAP support and the TAP driver inside autotools.
Diffstat (limited to 'json-glib')
| -rw-r--r-- | json-glib/Makefile.am | 10 | ||||
| -rw-r--r-- | json-glib/tests/Makefile.am | 52 |
2 files changed, 11 insertions, 51 deletions
diff --git a/json-glib/Makefile.am b/json-glib/Makefile.am index 64c74a6..90a363e 100644 --- a/json-glib/Makefile.am +++ b/json-glib/Makefile.am @@ -1,14 +1,10 @@ include $(top_srcdir)/build/autotools/Makefile.am.silent -include $(top_srcdir)/build/autotools/Makefile.am.gtest -if ENABLE_GLIB_TEST -# build this directory *before* the tests/ -SUBDIRS = . tests -endif +NULL = -DIST_SUBDIRS = tests +EXTRA_DIST = -NULL = +SUBDIRS = . tests AM_CPPFLAGS = \ -DPREFIX=\""$(prefix)"\" \ diff --git a/json-glib/tests/Makefile.am b/json-glib/tests/Makefile.am index 23a93d6..f6fd46d 100644 --- a/json-glib/tests/Makefile.am +++ b/json-glib/tests/Makefile.am @@ -1,27 +1,20 @@ -include $(top_srcdir)/build/autotools/Makefile.am.gtest -include $(top_srcdir)/build/autotools/Makefile.am.silent - -NULL = - -DISTCLEANFILES = - -insttestdir=$(pkglibexecdir)/installed-tests +include $(top_srcdir)/build/autotools/glib-tap.mk +AM_CFLAGS = -g $(JSON_CFLAGS) $(MAINTAINER_CFLAGS) +LDADD = $(top_builddir)/json-glib//libjson-glib-1.0.la $(JSON_LIBS) AM_CPPFLAGS = \ $(JSON_DEBUG_CFLAGS) \ + -DG_LOG_DOMAIN=\"Json\" \ -DTESTS_DATA_DIR=\""$(top_srcdir)/json-glib/tests"\" \ -I$(top_srcdir) \ -I$(top_srcdir)/json-glib \ $(NULL) -AM_CFLAGS = -g $(JSON_CFLAGS) $(MAINTAINER_CFLAGS) - -LDADD = \ - ../libjson-glib-1.0.la \ - $(JSON_LIBS) \ +dist_test_data = \ + stream-load.json \ $(NULL) -all_test_programs = \ +test_programs = \ array \ boxed \ builder \ @@ -38,33 +31,4 @@ all_test_programs = \ serialize-full \ $(NULL) -test_files = \ - stream-load.json \ - $(NULL) - -if BUILD_MODULAR_TESTS -TEST_PROGS += $(all_test_programs) -noinst_PROGRAMS = $(TEST_PROGS) -endif - -if BUILDOPT_INSTALL_TESTS -insttest_PROGRAMS = $(all_test_programs) - -testmetadir = $(datadir)/installed-tests/$(PACKAGE) -testmeta_DATA = $(all_test_programs:=.test) - -testdatadir=$(insttestdir) -testdata_DATA = $(test_files) - -testdata_SCRIPTS = $(test_script_files) -endif - -EXTRA_DIST += $(test_files) - -%.test: % Makefile - $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ - echo 'Type=session' >> $@.tmp; \ - echo 'Exec=env JSON_TEST_DATA=$(pkglibexecdir)/installed-tests $(pkglibexecdir)/installed-tests/$<' >> $@.tmp; \ - mv $@.tmp $@) - --include $(top_srcdir)/build/autotools/Makefile.am.gitignore +include $(top_srcdir)/build/autotools/Makefile.am.gitignore |
