diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-11-07 11:41:55 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-11-08 23:58:05 +0200 |
| commit | 48d3f9cfab7c6bb9dc632b5e658026248c869c28 (patch) | |
| tree | 0fd6debe17400bc7656832497387f0bff721d39e /guile | |
| parent | 67b16acbb28fa3d737a0a037c1ffa1303b971ce9 (diff) | |
tests: move to subdir, move to meson
De-clutter the source directories a bit. Ensure tests build with meson, and
remove from autotools in a few places (no need to do things twice).
Diffstat (limited to 'guile')
| -rw-r--r-- | guile/Makefile.am | 2 | ||||
| -rw-r--r-- | guile/meson.build | 5 | ||||
| -rw-r--r-- | guile/tests/Makefile.am | 46 | ||||
| -rw-r--r-- | guile/tests/meson.build | 27 | ||||
| -rw-r--r-- | guile/tests/test-mu-guile.cc | 4 |
5 files changed, 33 insertions, 51 deletions
diff --git a/guile/Makefile.am b/guile/Makefile.am index 048c0e0..85b2262 100644 --- a/guile/Makefile.am +++ b/guile/Makefile.am @@ -18,7 +18,7 @@ include $(top_srcdir)/gtest.mk # note, we need top_builddir for snarfing with 'make distcheck' (ie., # with separate builddir) -SUBDIRS= . mu scripts examples tests +SUBDIRS= . mu scripts examples AM_CPPFLAGS= \ -I. -I${top_builddir} -I${top_srcdir}/lib \ diff --git a/guile/meson.build b/guile/meson.build index bd33ab6..653527b 100644 --- a/guile/meson.build +++ b/guile/meson.build @@ -52,7 +52,6 @@ lib_guile_mu = shared_module( dependencies: [guile_dep, glib_dep, lib_mu_dep, config_h_dep, thread_dep ], install: true) - if makeinfo.found() custom_target('mu_guile_info', input: 'mu-guile.texi', @@ -68,3 +67,7 @@ endif guile_scm_dir=join_paths(datadir, 'guile', 'site', '3.0', 'mu') install_data(['mu.scm','mu/script.scm', 'mu/message.scm', 'mu/stats.scm', 'mu/plot.scm'], install_dir: guile_scm_dir) + +guile_builddir=meson.current_build_dir() + +subdir('tests') diff --git a/guile/tests/Makefile.am b/guile/tests/Makefile.am deleted file mode 100644 index afe893f..0000000 --- a/guile/tests/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2008-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> -## -## This program is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by the -## Free Software Foundation; either version 3, or (at your option) any -## later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software Foundation, -## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -include $(top_srcdir)/gtest.mk - -AM_CPPFLAGS=$(XAPIAN_CXXFLAGS) \ - $(GMIME_CFLAGS) \ - $(GLIB_CFLAGS) \ - -I${top_srcdir} \ - -I${top_srcdir}/lib \ - -DMU_TESTMAILDIR=\"${abs_top_srcdir}/lib/testdir\" \ - -DMU_TESTMAILDIR2=\"${abs_top_srcdir}/lib/testdir2\" \ - -DMU_TESTMAILDIR3=\"${abs_top_srcdir}/lib/testdir3\" \ - -DMU_PROGRAM=\"${abs_top_builddir}/mu/mu\" \ - -DMU_GUILE_MODULE_PATH=\"${abs_top_srcdir}/guile/\" \ - -DMU_GUILE_LIBRARY_PATH=\"${abs_top_builddir}/guile/.libs\" \ - -DABS_CURDIR=\"${abs_builddir}\" \ - -DABS_SRCDIR=\"${abs_srcdir}\" - -# don't use -Werror, as it might break on other compilers -# use -Wno-unused-parameters, because some callbacks may not -# really need all the params they get -AM_CFLAGS=$(ASAN_CFLAGS) ${WARN_CFLAGS} -AM_CXXFLAGS=$(ASAN_CXXFLAGS) ${WARN_CXXFLAGS} -AM_LDFLAGS=$(ASAN_LDFLAGS) - -noinst_PROGRAMS= $(TEST_PROGS) - -TEST_PROGS += test-mu-guile -test_mu_guile_SOURCES= test-mu-guile.cc -test_mu_guile_LDADD=${top_builddir}/lib/libtestmucommon.la - -EXTRA_DIST=test-mu-guile.scm test-mu-guile.cc diff --git a/guile/tests/meson.build b/guile/tests/meson.build new file mode 100644 index 0000000..367c0b6 --- /dev/null +++ b/guile/tests/meson.build @@ -0,0 +1,27 @@ +## Copyright (C) 2021 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software Foundation, +## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +test('test_mu_guile', + executable('test-mu-guile', + 'test-mu-guile.cc', + install: false, + cpp_args: [ + '-DABS_SRCDIR="' + meson.current_source_dir() + '"', + '-DMU_GUILE_LIBRARY_PATH="' + guile_builddir + '"', + '-DMU_GUILE_MODULE_PATH="' + guile_builddir + '"' + ], + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) diff --git a/guile/tests/test-mu-guile.cc b/guile/tests/test-mu-guile.cc index dbf622e..7ffc112 100644 --- a/guile/tests/test-mu-guile.cc +++ b/guile/tests/test-mu-guile.cc @@ -1,5 +1,5 @@ /* -** Copyright (C) 2012-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> +** Copyright (C) 2012-2021 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** ** This program is free software; you can redistribute it and/or modify it ** under the terms of the GNU General Public License as published by the @@ -17,9 +17,7 @@ ** */ -#if HAVE_CONFIG_H #include "config.h" -#endif /*HAVE_CONFIG_H*/ #include <glib.h> #include <glib/gstdio.h> |
