Makefile.am revision a4e54154
1# 
2#  test/Makefile.am
3# 
4#  Copyright © 2003 Keith Packard
5# 
6#  Permission to use, copy, modify, distribute, and sell this software and its
7#  documentation for any purpose is hereby granted without fee, provided that
8#  the above copyright notice appear in all copies and that both that
9#  copyright notice and this permission notice appear in supporting
10#  documentation, and that the name of the author(s) not be used in
11#  advertising or publicity pertaining to distribution of the software without
12#  specific, written prior permission.  The authors make no
13#  representations about the suitability of this software for any purpose.  It
14#  is provided "as is" without express or implied warranty.
15# 
16#  THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18#  EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22#  PERFORMANCE OF THIS SOFTWARE.
23
24check_SCRIPTS=run-test.sh
25TEST_EXTENSIONS = \
26	.sh \
27	$(NULL)
28
29AM_TESTS_ENVIRONMENT= \
30	src=${srcdir}; export src; \
31	EXEEXT=${EXEEXT}; export EXEEXT; \
32	LOG_COMPILER=${LOG_COMPILER} ; export LOG_COMPILER; \
33	$(NULL)
34
35BUILT_SOURCES = $(builddir)/out.expected
36
37SH_LOG_COMPILER = sh
38if OS_WIN32
39LOG_COMPILER = ${srcdir}/wrapper-script.sh
40endif
41TESTS=run-test.sh
42
43TESTDATA =			\
44	4x6.pcf			\
45	8x16.pcf		\
46	fonts.conf.in		\
47	test-45-generic.json	\
48	test-60-generic.json	\
49	test-90-synthetic.json	\
50	test-issue-286.json	\
51	test-style-match.json	\
52	$(NULL)
53
54if FREETYPE_PCF_LONG_FAMILY_NAMES
55$(builddir)/out.expected: $(srcdir)/out.expected-long-family-names Makefile
56	cp $(srcdir)/out.expected-long-family-names $(builddir)/out.expected
57else
58$(builddir)/out.expected: $(srcdir)/out.expected-no-long-family-names Makefile
59	cp $(srcdir)/out.expected-no-long-family-names $(builddir)/out.expected
60endif
61
62AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
63
64check_PROGRAMS =
65if HAVE_PTHREAD
66check_PROGRAMS += test-pthread
67test_pthread_LDADD = $(top_builddir)/src/libfontconfig.la
68# We don't enable this test by default because it will require config and fonts
69# to meaningfully test anything, and we are not installed yet.
70#TESTS += test-pthread
71
72check_PROGRAMS += test-crbug1004254
73test_crbug1004254_LDADD = $(top_builddir)/src/libfontconfig.la
74# Disabling this for the same reason as above but trying to run in run-test.sh.
75#TESTS += test-crbug1004254
76endif
77check_PROGRAMS += test-bz89617
78test_bz89617_CFLAGS = \
79	-DSRCDIR="\"$(abs_srcdir)\""
80
81test_bz89617_LDADD = $(top_builddir)/src/libfontconfig.la
82TESTS += test-bz89617
83
84check_PROGRAMS += test-bz131804
85test_bz131804_LDADD = $(top_builddir)/src/libfontconfig.la
86TESTS += test-bz131804
87
88noinst_PROGRAMS = $(check_PROGRAMS)
89
90if !OS_WIN32
91check_PROGRAMS += test-migration
92test_migration_LDADD = $(top_builddir)/src/libfontconfig.la
93endif
94
95check_PROGRAMS += test-bz96676
96test_bz96676_LDADD = $(top_builddir)/src/libfontconfig.la
97TESTS += test-bz96676
98
99check_PROGRAMS += test-name-parse
100test_name_parse_LDADD = $(top_builddir)/src/libfontconfig.la
101TESTS += test-name-parse
102
103if ENABLE_JSONC
104check_PROGRAMS += test-conf
105test_conf_CFLAGS = $(JSONC_CFLAGS)
106test_conf_LDADD = $(top_builddir)/src/libfontconfig.la $(JSONC_LIBS)
107endif
108TESTS += run-test-conf.sh
109
110check_PROGRAMS += test-bz106618
111test_bz106618_LDADD = $(top_builddir)/src/libfontconfig.la
112
113if !OS_WIN32
114check_PROGRAMS += test-bz106632
115test_bz106632_CFLAGS =					\
116	-I$(top_builddir)				\
117	-I$(top_builddir)/src				\
118	-I$(top_srcdir)					\
119	-I$(top_srcdir)/src				\
120	-DFONTFILE='"$(abs_top_srcdir)/test/4x6.pcf"'	\
121	-DHAVE_CONFIG_H					\
122	$(NULL)
123test_bz106632_LDADD = $(top_builddir)/src/libfontconfig.la
124TESTS += test-bz106632
125endif
126
127check_PROGRAMS += test-issue107
128test_issue107_LDADD =					\
129	$(top_builddir)/src/libfontconfig.la		\
130	$(NULL)
131TESTS += test-issue107
132
133if !ENABLE_SHARED
134if !OS_WIN32
135check_PROGRAMS += test-issue110
136test_issue110_CFLAGS =					\
137	-I$(top_builddir)				\
138	-I$(top_builddir)/src				\
139	-I$(top_srcdir)					\
140	-I$(top_srcdir)/src				\
141	-DHAVE_CONFIG_H					\
142	-DFONTCONFIG_PATH='"$(BASECONFIGDIR)"'		\
143	$(NULL)
144test_issue110_LDADD =					\
145	$(top_builddir)/src/libfontconfig.la		\
146	$(NULL)
147TESTS += test-issue110
148
149check_PROGRAMS += test-d1f48f11
150test_d1f48f11_CFLAGS =					\
151	-I$(top_builddir)				\
152	-I$(top_builddir)/src				\
153	-I$(top_srcdir)					\
154	-I$(top_srcdir)/src				\
155	-DHAVE_CONFIG_H					\
156	-DFONTCONFIG_PATH='"$(BASECONFIGDIR)"'		\
157	$(NULL)
158test_d1f48f11_LDADD =					\
159	$(top_builddir)/src/libfontconfig.la		\
160	$(NULL)
161TESTS += test-d1f48f11
162endif
163endif
164
165check_PROGRAMS += test-bz1744377
166test_bz1744377_LDADD = $(top_builddir)/src/libfontconfig.la
167TESTS += test-bz1744377
168
169check_PROGRAMS += test-issue180
170test_issue180_LDADD = $(top_builddir)/src/libfontconfig.la
171TESTS += test-issue180
172
173check_PROGRAMS += test-family-matching
174test_family_matching_LDADD = $(top_builddir)/src/libfontconfig.la
175TESTS += test-family-matching
176
177EXTRA_DIST=run-test.sh run-test-conf.sh wrapper-script.sh $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names
178
179CLEANFILES =		\
180	fonts.conf	\
181	out		\
182	out1		\
183	out2		\
184	out.expected	\
185	run*.log	\
186	run*.trs	\
187	test*.log	\
188	test*.trs	\
189	$(NULL)
190
191-include $(top_srcdir)/git.mk
192