03f732402aa95c0cb48db3e0a43e8f8db857288e
[platform/upstream/fontconfig.git] / test / Makefile.am
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
24 check_SCRIPTS=run-test.sh
25 TEST_EXTENSIONS = \
26         .sh \
27         $(NULL)
28
29 AM_TESTS_ENVIRONMENT= \
30         src=${srcdir}; export src; \
31         EXEEXT=${EXEEXT}; export EXEEXT; \
32         LOG_COMPILER=${LOG_COMPILER} ; export LOG_COMPILER; \
33         $(NULL)
34
35 BUILT_SOURCES = $(builddir)/out.expected
36
37 SH_LOG_COMPILER = sh
38 if OS_WIN32
39 LOG_COMPILER = ${srcdir}/wrapper-script.sh
40 endif
41 TESTS=run-test.sh
42
43 TESTDATA =                      \
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
54 if 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
57 else
58 $(builddir)/out.expected: $(srcdir)/out.expected-no-long-family-names Makefile
59         cp $(srcdir)/out.expected-no-long-family-names $(builddir)/out.expected
60 endif
61
62 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
63
64 check_PROGRAMS =
65 if HAVE_PTHREAD
66 check_PROGRAMS += test-pthread
67 test_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
72 check_PROGRAMS += test-crbug1004254
73 test_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
76 endif
77 check_PROGRAMS += test-bz89617
78 test_bz89617_CFLAGS = \
79         -DSRCDIR="\"$(abs_srcdir)\""
80
81 test_bz89617_LDADD = $(top_builddir)/src/libfontconfig.la
82 TESTS += test-bz89617
83
84 check_PROGRAMS += test-bz131804
85 test_bz131804_LDADD = $(top_builddir)/src/libfontconfig.la
86 TESTS += test-bz131804
87
88 noinst_PROGRAMS = $(check_PROGRAMS)
89
90 if !OS_WIN32
91 check_PROGRAMS += test-migration
92 test_migration_LDADD = $(top_builddir)/src/libfontconfig.la
93 endif
94
95 check_PROGRAMS += test-bz96676
96 test_bz96676_LDADD = $(top_builddir)/src/libfontconfig.la
97 TESTS += test-bz96676
98
99 check_PROGRAMS += test-name-parse
100 test_name_parse_LDADD = $(top_builddir)/src/libfontconfig.la
101 TESTS += test-name-parse
102
103 if ENABLE_JSONC
104 check_PROGRAMS += test-conf
105 test_conf_CFLAGS = $(JSONC_CFLAGS)
106 test_conf_LDADD = $(top_builddir)/src/libfontconfig.la $(JSONC_LIBS)
107 endif
108 TESTS += run-test-conf.sh
109
110 check_PROGRAMS += test-bz106618
111 test_bz106618_LDADD = $(top_builddir)/src/libfontconfig.la
112
113 if !OS_WIN32
114 check_PROGRAMS += test-bz106632
115 test_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)
123 test_bz106632_LDADD = $(top_builddir)/src/libfontconfig.la
124 TESTS += test-bz106632
125 endif
126
127 check_PROGRAMS += test-issue107
128 test_issue107_LDADD =                                   \
129         $(top_builddir)/src/libfontconfig.la            \
130         $(NULL)
131 TESTS += test-issue107
132
133 if !ENABLE_SHARED
134 if !OS_WIN32
135 check_PROGRAMS += test-issue110
136 test_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)
144 test_issue110_LDADD =                                   \
145         $(top_builddir)/src/libfontconfig.la            \
146         $(NULL)
147 TESTS += test-issue110
148
149 check_PROGRAMS += test-d1f48f11
150 test_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)
158 test_d1f48f11_LDADD =                                   \
159         $(top_builddir)/src/libfontconfig.la            \
160         $(NULL)
161 TESTS += test-d1f48f11
162 endif
163 endif
164
165 check_PROGRAMS += test-bz1744377
166 test_bz1744377_LDADD = $(top_builddir)/src/libfontconfig.la
167 TESTS += test-bz1744377
168
169 check_PROGRAMS += test-issue180
170 test_issue180_LDADD = $(top_builddir)/src/libfontconfig.la
171 TESTS += test-issue180
172
173 check_PROGRAMS += test-family-matching
174 test_family_matching_LDADD = $(top_builddir)/src/libfontconfig.la
175 TESTS += test-family-matching
176
177 EXTRA_DIST=run-test.sh run-test-conf.sh wrapper-script.sh $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names
178
179 CLEANFILES =            \
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