Commit f9eb9eed authored by Allison Karlitskaya's avatar Allison Karlitskaya

Rework the build system for a new tests approach

Perform a substantial cleanup of the build system with respect to
building and installing testcases.

First, Makefile.decl has been renamed glib.mk and substantially
expanded.  We intend to add more stuff here in the future, like canned
rules for mkenums, marshallers, resources, etc.

By default, tests are no longer compiled as part of 'make'.  They will
be built when 'make check' is run.  The old behaviour can be obtained
with --enable-always-build-tests.

--disable-modular-tests is gone (because tests are no longer built by
default).  There is no longer any way to cause 'make check' to be a
no-op, but that's not very useful anyway.

A new glibtests.m4 file is introduced.  Along with glib.mk, this
provides for consistent handling of --enable-installed-tests and
--enable-always-build-tests (mentioned above).

Port our various test-installing Makefiles to the new framework.

This patch substantially improves the situation in the toplevel tests/
directory.  Things are now somewhat under control there.  There were
some tests being built that weren't even being run and we run those now.
The long-running GObject performance tests in this directory have been
removed from 'make check' because they take too long.

As an experiment, 'make check' now runs the testcases on win32 builds,
by default.  We can't run them under gtester (since it uses a pipe to
communicate with the subprocess) so just toss them in TESTS.  Most of
them are passing on win32.

Things are not quite done here, but this patch is already a substantial
improvement.  More to come.
parent 210b1f8b
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
# http://people.gnome.org/~walters/docs/build-api.txt
.buildapi-allow-builddir:
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs
SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs tests
DIST_SUBDIRS = $(SUBDIRS) build
if BUILD_MODULAR_TESTS
SUBDIRS += tests
else
DIST_SUBDIRS += tests
endif
bin_SCRIPTS = glib-gettextize
if OS_LINUX
TESTS = check-abis.sh
TESTS += check-abis.sh
endif
AM_CPPFLAGS = \
......@@ -49,7 +44,7 @@ EXTRA_DIST += \
README.win32 \
HACKING \
autogen.sh \
Makefile.decl \
glib.mk \
makefile.msc \
msvc_recommended_pragmas.h \
config.h.win32.in \
......@@ -67,7 +62,7 @@ EXTRA_DIST += \
# These may be in the builddir too
BUILT_EXTRA_DIST = \
BUILT_EXTRA_DIST += \
README \
INSTALL \
ChangeLog \
......@@ -105,7 +100,7 @@ $(pkgconfig_DATA): config.status
# build documentation when doing distcheck
DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gtk-doc --enable-man --disable-maintainer-mode
DISTCLEANFILES = config.lt
DISTCLEANFILES += config.lt
distclean-local: lcov-clean
if test $(srcdir) = .; then :; else \
......
......@@ -254,16 +254,8 @@ AC_ARG_ENABLE(rebuilds,
[AS_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
[enable_rebuilds=yes])
AC_ARG_ENABLE(modular_tests,
AS_HELP_STRING([--disable-modular-tests],
[Disable build of test programs (default: no)]),,
[enable_modular_tests=yes])
AC_ARG_ENABLE(installed_tests,
AS_HELP_STRING([--enable-installed-tests],
[Install test programs (default: no)]),,
[enable_installed_tests=no])
AM_CONDITIONAL(BUILD_MODULAR_TESTS, test x$enable_modular_tests = xyes || test x$enable_installed_tests=xyes)
AM_CONDITIONAL(BUILDOPT_INSTALL_TESTS, test x$enable_installed_tests = xyes)
GLIB_TESTS
AC_MSG_CHECKING([whether to enable garbage collector friendliness])
AS_IF([test "x$enable_gc_friendly" = "xyes"], [
......@@ -2710,7 +2702,7 @@ dnl ******************************************************************
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
AS_IF([ test $cross_compiling = yes && test x$enable_modular_tests = xyes], [
AS_IF([ test $cross_compiling = yes ], [
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal, no)
if test x$GLIB_GENMARSHAL = xno; then
AC_MSG_ERROR(Could not find a glib-genmarshal in your PATH)
......@@ -3653,14 +3645,12 @@ AC_CHECK_ALIGNOF([unsigned long])
# Check for libdbus1 - Optional - is only used in the GDBus test cases
#
# 1.2.14 required for dbus_message_set_serial
AS_IF([ test x$enable_modular_tests = xyes], [
PKG_CHECK_MODULES(DBUS1,
dbus-1 >= 1.2.14,
[AC_DEFINE(HAVE_DBUS1, 1, [Define if dbus-1 is available]) have_dbus1=yes],
have_dbus1=no)
AC_SUBST(DBUS1_CFLAGS)
AC_SUBST(DBUS1_LIBS)
])
PKG_CHECK_MODULES(DBUS1,
dbus-1 >= 1.2.14,
[AC_DEFINE(HAVE_DBUS1, 1, [Define if dbus-1 is available]) have_dbus1=yes],
have_dbus1=no)
AC_SUBST(DBUS1_CFLAGS)
AC_SUBST(DBUS1_LIBS)
AM_CONDITIONAL(HAVE_DBUS1, [test "x$have_dbus1" = "xyes"])
AC_CHECK_PROGS([DBUS_DAEMON], [dbus-daemon])
......
include $(top_srcdir)/Makefile.decl
NULL =
include $(top_srcdir)/glib.mk
SUBDIRS = gdbus-2.0/codegen
......@@ -10,7 +8,7 @@ endif
if OS_WIN32_AND_DLL_COMPILATION
if MS_LIB_AVAILABLE
noinst_DATA = gio-2.0.lib
noinst_DATA += gio-2.0.lib
install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
......@@ -233,7 +231,7 @@ platform_libadd += win32/libgiowin32.la
platform_deps += win32/libgiowin32.la
endif
SUBDIRS += .
SUBDIRS += . tests
if HAVE_FAM
SUBDIRS += fam
......@@ -327,10 +325,6 @@ giowin32include_HEADERS = \
endif
if BUILD_MODULAR_TESTS
SUBDIRS += tests
endif
libgio_2_0_la_SOURCES = \
gappinfo.c \
gasynchelper.c \
......@@ -622,7 +616,7 @@ gioinclude_HEADERS = \
gioenumtypes.h
# these sources (also mentioned above) are generated.
BUILT_SOURCES = \
BUILT_SOURCES += \
gconstructor_as_data.h \
gioenumtypes.h \
gioenumtypes.c \
......@@ -642,17 +636,17 @@ EXTRA_DIST += \
gnetworking.h.win32 \
$(NULL)
BUILT_EXTRA_DIST = \
BUILT_EXTRA_DIST += \
gio.rc
# This is read by gobject-introspection/misc/ and gtk-doc
gio-public-headers.txt: Makefile
$(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
CLEANFILES = gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
DISTCLEANFILES = \
DISTCLEANFILES += \
gioenumtypes.h \
gioenumtypes.c
......
include $(top_srcdir)/Makefile.decl
NULL =
include $(top_srcdir)/glib.mk
module_flags = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload|query)'
......
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
NULL =
noinst_LTLIBRARIES = libfen.la
noinst_LTLIBRARIES += libfen.la
libfen_la_SOURCES = \
fen-dump.c \
......
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
NULL =
bin_SCRIPTS =
CLEANFILES =
codegendir = $(datadir)/glib-2.0/codegen
codegen_PYTHON = \
......
......@@ -1126,7 +1126,7 @@ parse_state_start_schema (ParseState *state,
{
g_set_error (error, G_MARKUP_ERROR,
G_MARKUP_ERROR_INVALID_CONTENT,
_("<schema id='%s'> extends not-yet-existing "
_("<schema id='%s'> extends not yet existing "
"schema '%s'"), id, extends_name);
return;
}
......@@ -1142,7 +1142,7 @@ parse_state_start_schema (ParseState *state,
{
g_set_error (error, G_MARKUP_ERROR,
G_MARKUP_ERROR_INVALID_CONTENT,
_("<schema id='%s'> is list of not-yet-existing "
_("<schema id='%s'> is list of not yet existing "
"schema '%s'"), id, list_of);
return;
}
......
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
NULL =
noinst_LTLIBRARIES = libinotify.la
noinst_LTLIBRARIES += libinotify.la
libinotify_la_SOURCES = \
inotify-kernel.c \
......
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
NULL =
noinst_LTLIBRARIES = libkqueue.la
noinst_LTLIBRARIES += libkqueue.la
libkqueue_la_SOURCES = \
gkqueuefilemonitor.c \
......
This diff is collapsed.
......@@ -15,6 +15,12 @@ test_launch (void)
const gchar *path;
gchar *uri;
if (!g_getenv ("DISPLAY"))
{
g_printerr ("No DISPLAY. Skipping test. ");
return;
}
path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
g_assert (appinfo != NULL);
......
......@@ -91,7 +91,7 @@ test_type (void)
g_assert_cmpint (type, ==, G_FILE_TYPE_REGULAR);
g_object_unref (file);
file = g_file_get_child (datapath_f, "schema-tests");
file = g_file_get_child (datapath_f, "cert-tests");
type = g_file_query_file_type (file, 0, NULL);
g_assert_cmpint (type, ==, G_FILE_TYPE_DIRECTORY);
......
#include "gdbus-example-objectmanager-generated.h"
#include "gdbus-object-manager-example/gdbus-example-objectmanager-generated.h"
/* ---------------------------------------------------------------------------------------------------- */
......
#include "gdbus-example-objectmanager-generated.h"
#include "gdbus-object-manager-example/gdbus-example-objectmanager-generated.h"
/* ---------------------------------------------------------------------------------------------------- */
......
NULL =
BUILT_SOURCES =
CLEANFILES =
include $(top_srcdir)/glib.mk
include $(top_srcdir)/Makefile.decl
AM_CPPFLAGS = \
-g \
$(gio_INCLUDES) \
$(GLIB_DEBUG_FLAGS) \
-I$(top_builddir)/gio \
-I$(top_srcdir)/gio \
-DSRCDIR=\""$(srcdir)"\"
AM_CPPFLAGS = -g $(gio_INCLUDES) $(GLIB_DEBUG_FLAGS) -I$(top_builddir)/gio -I$(top_srcdir)/gio
# ------------------------------------------------------------------------
GDBUS_GENERATED = \
gdbus-example-objectmanager-generated.h \
gdbus-example-objectmanager-generated.c \
GDBUS_GENERATED = \
gdbus-example-objectmanager-generated.h \
gdbus-example-objectmanager-generated.c \
gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Animal.xml \
gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml \
gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml \
$(NULL)
$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
......@@ -33,11 +23,19 @@ $(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gi
$< \
$(NULL)
test_ltlibraries = libgdbus-example-objectmanager.la
if ENABLE_GTK_DOC
# The docs pull these in, so we need them even if not doing 'make check'
BUILT_SOURCES += $(GDBUS_GENERATED)
noinst_LTLIBRARIES += libgdbus-example-objectmanager.la
endif
noinst_LTLIBRARIES = libgdbus-example-objectmanager.la
libgdbus_example_objectmanager_la_SOURCES = gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c
libgdbus_example_objectmanager_la_LIBADD = \
nodist_libgdbus_example_objectmanager_la_SOURCES = \
gdbus-example-objectmanager-generated.h \
gdbus-example-objectmanager-generated.c
libgdbus_example_objectmanager_la_LIBADD = \
$(top_builddir)/glib/libglib-2.0.la \
$(top_builddir)/gobject/libgobject-2.0.la \
$(top_builddir)/gmodule/libgmodule-2.0.la \
......@@ -47,4 +45,3 @@ libgdbus_example_objectmanager_la_LIBADD = \
EXTRA_DIST += gdbus-example-objectmanager.xml
CLEANFILES += $(GDBUS_GENERATED)
......@@ -53,7 +53,7 @@
#include "gdbus-tests.h"
#include "gdbus-example-objectmanager-generated.h"
#include "gdbus-object-manager-example/gdbus-example-objectmanager-generated.h"
#ifdef G_OS_UNIX
static gboolean is_unix = TRUE;
......
#include "gdbus-example-objectmanager-generated.h"
#include "gdbus-object-manager-example/gdbus-example-objectmanager-generated.h"
/* ---------------------------------------------------------------------------------------------------- */
......
......@@ -107,14 +107,14 @@ static const SchemaTest tests[] = {
{ "range-parse-error", NULL, "*invalid character in number*" },
{ "from-docs", NULL, NULL },
{ "extending", NULL, NULL },
{ "extend-missing", NULL, "*extends not-yet-existing schema*" },
{ "extend-missing", NULL, "*extends not yet existing schema*" },
{ "extend-nonlist", NULL, "*which is not a list*" },
{ "extend-self", NULL, "*not-yet-existing*" },
{ "extend-self", NULL, "*not yet existing*" },
{ "extend-wrong-list-indirect", NULL, "*'y' does not extend 'x'*" },
{ "extend-wrong-list", NULL, "*'y' does not extend 'x'*" },
{ "key-in-list-indirect", NULL, "*cannot add keys to a 'list*" },
{ "key-in-list", NULL, "*cannot add keys to a 'list*" },
{ "list-of-missing", NULL, "*is list of not-yet-existing schema*" },
{ "list-of-missing", NULL, "*is list of not yet existing schema*" },
{ "extend-and-shadow", NULL, "*shadows*use <override>*" },
{ "extend-and-shadow-indirect", NULL, "*shadows*use <override>*" },
{ "override", NULL, NULL },
......
......@@ -660,14 +660,20 @@ test_l10n (void)
str = NULL;
setlocale (LC_MESSAGES, "de_DE");
str = g_settings_get_string (settings, "error-message");
setlocale (LC_MESSAGES, locale);
/* Only do the test if translation is actually working... */
if (g_str_equal (dgettext ("test", "\"Unnamed\""), "\"Unbenannt\""))
{
str = g_settings_get_string (settings, "error-message");
g_assert_cmpstr (str, ==, "Unbenannt");
g_object_unref (settings);
g_free (str);
str = NULL;
g_assert_cmpstr (str, ==, "Unbenannt");
g_object_unref (settings);
g_free (str);
str = NULL;
}
else
g_printerr ("warning: translation is not working... skipping test. ");
setlocale (LC_MESSAGES, locale);
g_free (locale);
}
......@@ -701,14 +707,20 @@ test_l10n_context (void)
str = NULL;
setlocale (LC_MESSAGES, "de_DE");
g_settings_get (settings, "backspace", "s", &str);
setlocale (LC_MESSAGES, locale);
/* Only do the test if translation is actually working... */
if (g_str_equal (dgettext ("test", "\"Unnamed\""), "\"Unbenannt\""))
{
g_settings_get (settings, "backspace", "s", &str);
g_assert_cmpstr (str, ==, "Löschen");
g_object_unref (settings);
g_free (str);
str = NULL;
g_assert_cmpstr (str, ==, "Löschen");
g_object_unref (settings);
g_free (str);
str = NULL;
}
else
g_printerr ("warning: translation is not working... skipping test. ");
setlocale (LC_MESSAGES, locale);
g_free (locale);
}
......@@ -1578,24 +1590,6 @@ test_child_schema (void)
g_object_unref (settings);
}
static gboolean
glib_translations_work (void)
{
gboolean works;
gchar *locale;
gchar *orig = "Unnamed";
locale = g_strdup (setlocale (LC_MESSAGES, NULL));
if (!setlocale (LC_MESSAGES, "de"))
works = FALSE;
else
works = dgettext ("glib20", orig) != orig;
setlocale (LC_MESSAGES, locale);
g_free (locale);
return works;
}
#include "../strinfo.c"
static void
......@@ -2316,11 +2310,8 @@ main (int argc, char *argv[])
g_test_add_func ("/gsettings/complex-types", test_complex_types);
g_test_add_func ("/gsettings/changes", test_changes);
if (glib_translations_work ())
{
g_test_add_func ("/gsettings/l10n", test_l10n);
g_test_add_func ("/gsettings/l10n-context", test_l10n_context);
}
g_test_add_func ("/gsettings/l10n", test_l10n);
g_test_add_func ("/gsettings/l10n-context", test_l10n_context);
g_test_add_func ("/gsettings/delay-apply", test_delay_apply);
g_test_add_func ("/gsettings/delay-revert", test_delay_revert);
......
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
NULL =
noinst_LTLIBRARIES = libgiowin32.la
noinst_LTLIBRARIES += libgiowin32.la
libgiowin32_la_SOURCES = \
gwin32directorymonitor.c \
......
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
AM_CPPFLAGS = -DXDG_PREFIX=_gio_xdg
noinst_LTLIBRARIES = libxdgmime.la
noinst_LTLIBRARIES += libxdgmime.la
libxdgmime_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
libxdgmime_la_SOURCES = \
......
......@@ -3,11 +3,34 @@
#GTESTER = gtester # for non-GLIB packages
GTESTER = $(top_builddir)/glib/gtester # for the GLIB package
GTESTER_REPORT = $(top_builddir)/glib/gtester-report # for the GLIB package
NULL =
# initialize variables for unconditional += appending
BUILT_SOURCES =
BUILT_EXTRA_DIST =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
EXTRA_DIST =
TEST_PROGS =
installed_test_LTLIBRARIES =
installed_test_PROGRAMS =
installed_test_SCRIPTS =
nobase_installed_test_DATA =
noinst_LTLIBRARIES =
noinst_PROGRAMS =
noinst_SCRIPTS =
noinst_DATA =
check_LTLIBRARIES =
check_PROGRAMS =
check_SCRIPTS =
check_DATA =
TESTS =
### testing rules
# test: run all tests in cwd and subdirs
......@@ -25,6 +48,10 @@ else
test-nonrecursive:
endif
if OS_WIN32
TESTS += $(addsuffix .exe, $(TEST_PROGS))
endif
# test-report: run tests in subdirs and generate report
# perf-report: run tests in subdirs with -m perf and generate report
# full-report: like test-report: with -m perf and -m slow
......@@ -95,3 +122,102 @@ lcov-clean:
# run tests in cwd as part of make check
check-local: test-nonrecursive
# We support a fairly large range of possible variables. It is expected that all types of files in a test suite
# will belong in exactly one of the following variables.
#
# First, we support the usual automake suffixes, but in lowercase, with the customary meaning:
#
# test_programs, test_scripts, test_data, test_ltlibraries
#
# The above are used to list files that are involved in both uninstalled and installed testing. The
# test_programs and test_scripts are taken to be actual testcases and will be run as part of the test suite.
# Note that _data is always used with the nobase_ automake variable name to ensure that installed test data is
# installed in the same way as it appears in the package layout.
#
# In order to mark a particular file as being only for one type of testing, use 'installed' or 'uninstalled',
# like so:
#
# installed_test_programs, uninstalled_test_programs
# installed_test_scripts, uninstalled_test_scripts
# installed_test_data, uninstalled_test_data
# installed_test_ltlibraries, uninstalled_test_ltlibraries
#
# Additionally, we support 'extra' infixes for programs and scripts. This is used for support programs/scripts
# that should not themselves be run as testcases (but exist to be used from other testcases):
#
# test_extra_programs, installed_test_extra_programs, uninstalled_test_extra_programs
# test_extra_scripts, installed_test_extra_scripts, uninstalled_test_extra_scripts
#
# Additionally, for _scripts and _data, we support the customary dist_ prefix so that the named script or data
# file automatically end up in the tarball.
#
# dist_test_scripts, dist_test_data, dist_test_extra_scripts
# dist_installed_test_scripts, dist_installed_test_data, dist_installed_test_extra_scripts
# dist_uninstalled_test_scripts, dist_uninstalled_test_data, dist_uninstalled_test_extra_scripts
#
# Note that no file is automatically disted unless it appears in one of the dist_ variables. This follows the
# standard automake convention of not disting programs scripts or data by default.
#
# test_programs, test_scripts, uninstalled_test_programs and uninstalled_test_scripts (as well as their disted
# variants) will be run as part of the in-tree 'make check'. These are all assumed to be runnable under
# gtester. That's a bit strange for scripts, but it's possible.
# we use test -z "$(TEST_PROGS)" above, so make sure we have no extra whitespace...
TEST_PROGS += $(strip $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \
$(dist_test_scripts) $(dist_uninstalled_test_scripts))
# Note: build even the installed-only targets during 'make check' to ensure that they still work.
# We need to do a bit of trickery here and manage disting via EXTRA_DIST instead of using dist_ prefixes to
# prevent automake from mistreating gmake functions like $(wildcard ...) and $(addprefix ...) as if they were
# filenames, including removing duplicate instances of the opening part before the space, eg. '$(addprefix'.
all_test_programs = $(test_programs) $(uninstalled_test_programs) $(installed_test_programs) \
$(test_extra_programs) $(uninstalled_test_extra_programs) $(installed_test_extra_programs)
all_test_scripts = $(test_scripts) $(uninstalled_test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(uninstalled_test_extra_scripts) $(installed_test_extra_scripts)
all_dist_test_scripts = $(dist_test_scripts) $(dist_uninstalled_test_scripts) $(dist_installed_test_scripts) \
$(dist_test_extra_scripts) $(dist_uninstalled_test_extra_scripts) $(dist_installed_test_extra_scripts)
all_test_scripts += $(all_dist_test_scripts)
EXTRA_DIST += $(all_dist_test_scripts)
all_test_data = $(test_data) $(uninstalled_test_data) $(installed_test_data)
all_dist_test_data = $(dist_test_data) $(dist_uninstalled_test_data) $(dist_installed_test_data)
all_test_data += $(all_dist_test_data)
EXTRA_DIST += $(all_dist_test_data)
all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installed_test_ltlibraries)
if ENABLE_ALWAYS_BUILD_TESTS
noinst_LTLIBRARIES += $(all_test_ltlibs)
noinst_PROGRAMS += $(all_test_programs)
noinst_SCRIPTS += $(all_test_scripts)
noinst_DATA += $(all_test_data)
else
check_LTLIBRARIES += $(all_test_ltlibs)
check_PROGRAMS += $(all_test_programs)
check_SCRIPTS += $(all_test_scripts)
check_DATA += $(all_test_data)
endif
if ENABLE_INSTALLED_TESTS
installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \
$(test_extra_programs) $(installed_test_extra_programs)
installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(test_installed_extra_scripts)
installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \
$(dist_installed_test_scripts) $(dist_installed_test_extra_scripts)
nobase_installed_test_DATA += $(test_data) $(installed_test_data)
nobase_installed_test_DATA += $(dist_test_data) $(dist_installed_test_data)
installed_test_LTLIBRARIES += $(test_ltlibraries) $(installed_test_ltlibraries)
installed_testcases = $(test_programs) $(installed_test_programs) \
$(test_scripts) $(installed_test_scripts) \
$(dist_test_scripts) $(dist_installed_test_scripts)
installed_test_meta_DATA = $(installed_testcases:=.test)
%.test: %$(EXEEXT) Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Exec=$(installed_testdir)/$<' >> $@.tmp; \
mv $@.tmp $@)
CLEANFILES += $(installed_test_meta_DATA)
endif
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
BUILT_SOURCES =
DISTCLEANFILES =
CLEANFILES =
include $(top_srcdir)/glib.mk
#
# Generate glibconfig.h
......@@ -35,11 +31,8 @@ else
MAYBE_PCRE = pcre
endif
SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre .
SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
if BUILD_MODULAR_TESTS
SUBDIRS += tests
endif
AM_CPPFLAGS = \
$(glib_INCLUDES) \
......@@ -77,7 +70,7 @@ EXTRA_DIST += \
CLEANFILES += libglib-gdb.py
# These may be in the builddir too
BUILT_EXTRA_DIST = \
BUILT_EXTRA_DIST += \
makefile.msc \
glibconfig.h.win32 \
glib.rc
......@@ -86,7 +79,7 @@ lib_LTLIBRARIES = libglib-2.0.la
if OS_WIN32_AND_DLL_COMPILATION
if MS_LIB_AVAILABLE
noinst_DATA = glib-2.0.lib
noinst_DATA += glib-2.0.lib
install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
......
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
AM_CPPFLAGS = \
$(glib_INCLUDES) \
......@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
-DG_DISABLE_DEPRECATED \
-DGLIB_COMPILATION
noinst_LTLIBRARIES = libgnulib.la
noinst_LTLIBRARIES += libgnulib.la
libgnulib_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
libgnulib_la_SOURCES = \
......
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
AM_CPPFLAGS = \
-DLIBDIR=\"$(libdir)\" \
$(config_h_INCLUDES)
noinst_LTLIBRARIES = libcharset.la
noinst_LTLIBRARIES += libcharset.la
libcharset_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
libcharset_la_SOURCES = \
......@@ -63,4 +63,4 @@ SUFFIXES = .sed .sin
$(AM_V_GEN) $(SED) -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
@mv t-$@ $@
CLEANFILES = charset.alias ref-add.sed ref-del.sed
CLEANFILES += charset.alias ref-add.sed ref-del.sed
include $(top_srcdir)/Makefile.decl
include $(top_srcdir)/glib.mk
noinst_LTLIBRARIES = libpcre.la
noinst_LTLIBRARIES += libpcre.la
libpcre_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"GLib-GRegex\" \
......
include $(top_srcdir)/Makefile.decl
NULL =
include $(top_srcdir)/glib.mk
insttestdir=$(pkglibexecdir)/installed-tests
LDADD = $(top_builddir)/glib/libglib-2.0.la -lm
AM_CPPFLAGS = -g $(glib_INCLUDES) $(GLIB_DEBUG_FLAGS)
DEFS = -DG_LOG_DOMAIN=\"GLib\" -DEXEEXT=\"$(EXEEXT)\"
AM_CFLAGS = $(GLIB_WARN_CFLAGS)
bookmark_test_files = \
bookmarks/fail-01.xbel \
bookmarks/fail-02.xbel \
bookmarks/fail-03.xbel \
bookmarks/fail-04.xbel \
bookmarks/fail-05.xbel \
bookmarks/fail-06.xbel \
bookmarks/fail-07.xbel \
bookmarks/fail-08.xbel \
bookmarks/fail-09.xbel \
bookmarks/fail-10.xbel \
bookmarks/fail-11.xbel \
bookmarks/fail-12.xbel \
bookmarks/fail-13.xbel \
bookmarks/fail-14.xbel \
bookmarks/fail-15.xbel \
bookmarks/fail-16.xbel \
bookmarks/fail-17.xbel \
bookmarks/valid-01.xbel \
bookmarks/valid-02.xbel \
bookmarks/valid-03.xbel \
$(NULL)
# -----------------------------------------------------------------------------
markup_tests = \
fail-1 fail-2 fail-3 fail-4 fail-5 \
fail-6 fail-7 fail-8 fail-9 fail-10 \
fail-11 fail-12 fail-13 fail-14 fail-15 \
fail-16 fail-17 fail-18 fail-19 fail-20 \