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-style-match.json \ 51 $(NULL) 52 53if FREETYPE_PCF_LONG_FAMILY_NAMES 54$(builddir)/out.expected: $(srcdir)/out.expected-long-family-names Makefile 55 cp $(srcdir)/out.expected-long-family-names $(builddir)/out.expected 56else 57$(builddir)/out.expected: $(srcdir)/out.expected-no-long-family-names Makefile 58 cp $(srcdir)/out.expected-no-long-family-names $(builddir)/out.expected 59endif 60 61AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) 62 63check_PROGRAMS = 64if HAVE_PTHREAD 65check_PROGRAMS += test-pthread 66test_pthread_LDADD = $(top_builddir)/src/libfontconfig.la 67# We don't enable this test by default because it will require config and fonts 68# to meaningfully test anything, and we are not installed yet. 69#TESTS += test-pthread 70 71check_PROGRAMS += test-crbug1004254 72test_crbug1004254_LDADD = $(top_builddir)/src/libfontconfig.la 73# Disabling this for the same reason as above but trying to run in run-test.sh. 74#TESTS += test-crbug1004254 75endif 76check_PROGRAMS += test-bz89617 77test_bz89617_CFLAGS = \ 78 -DSRCDIR="\"$(abs_srcdir)\"" 79 80test_bz89617_LDADD = $(top_builddir)/src/libfontconfig.la 81TESTS += test-bz89617 82 83check_PROGRAMS += test-bz131804 84test_bz131804_LDADD = $(top_builddir)/src/libfontconfig.la 85TESTS += test-bz131804 86 87noinst_PROGRAMS = $(check_PROGRAMS) 88 89if !OS_WIN32 90check_PROGRAMS += test-migration 91test_migration_LDADD = $(top_builddir)/src/libfontconfig.la 92endif 93 94check_PROGRAMS += test-bz96676 95test_bz96676_LDADD = $(top_builddir)/src/libfontconfig.la 96TESTS += test-bz96676 97 98check_PROGRAMS += test-name-parse 99test_name_parse_LDADD = $(top_builddir)/src/libfontconfig.la 100TESTS += test-name-parse 101 102if ENABLE_JSONC 103check_PROGRAMS += test-conf 104test_conf_CFLAGS = $(JSONC_CFLAGS) 105test_conf_LDADD = $(top_builddir)/src/libfontconfig.la $(JSONC_LIBS) 106endif 107TESTS += run-test-conf.sh 108 109check_PROGRAMS += test-bz106618 110test_bz106618_LDADD = $(top_builddir)/src/libfontconfig.la 111 112if !OS_WIN32 113check_PROGRAMS += test-bz106632 114test_bz106632_CFLAGS = \ 115 -I$(top_builddir) \ 116 -I$(top_builddir)/src \ 117 -I$(top_srcdir) \ 118 -I$(top_srcdir)/src \ 119 -DFONTFILE='"$(abs_top_srcdir)/test/4x6.pcf"' \ 120 -DHAVE_CONFIG_H \ 121 $(NULL) 122test_bz106632_LDADD = $(top_builddir)/src/libfontconfig.la 123TESTS += test-bz106632 124endif 125 126check_PROGRAMS += test-issue107 127test_issue107_LDADD = \ 128 $(top_builddir)/src/libfontconfig.la \ 129 $(NULL) 130TESTS += test-issue107 131 132if !ENABLE_SHARED 133if !OS_WIN32 134check_PROGRAMS += test-issue110 135test_issue110_CFLAGS = \ 136 -I$(top_builddir) \ 137 -I$(top_builddir)/src \ 138 -I$(top_srcdir) \ 139 -I$(top_srcdir)/src \ 140 -DHAVE_CONFIG_H \ 141 -DFONTCONFIG_PATH='"$(BASECONFIGDIR)"' \ 142 $(NULL) 143test_issue110_LDADD = \ 144 $(top_builddir)/src/libfontconfig.la \ 145 $(NULL) 146TESTS += test-issue110 147 148check_PROGRAMS += test-d1f48f11 149test_d1f48f11_CFLAGS = \ 150 -I$(top_builddir) \ 151 -I$(top_builddir)/src \ 152 -I$(top_srcdir) \ 153 -I$(top_srcdir)/src \ 154 -DHAVE_CONFIG_H \ 155 -DFONTCONFIG_PATH='"$(BASECONFIGDIR)"' \ 156 $(NULL) 157test_d1f48f11_LDADD = \ 158 $(top_builddir)/src/libfontconfig.la \ 159 $(NULL) 160TESTS += test-d1f48f11 161endif 162endif 163 164check_PROGRAMS += test-bz1744377 165test_bz1744377_LDADD = $(top_builddir)/src/libfontconfig.la 166TESTS += test-bz1744377 167 168check_PROGRAMS += test-issue180 169test_issue180_LDADD = $(top_builddir)/src/libfontconfig.la 170TESTS += test-issue180 171 172check_PROGRAMS += test-family-matching 173test_family_matching_LDADD = $(top_builddir)/src/libfontconfig.la 174TESTS += test-family-matching 175 176EXTRA_DIST=run-test.sh run-test-conf.sh $(LOG_COMPILER) $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names 177 178CLEANFILES = \ 179 fonts.conf \ 180 out \ 181 out1 \ 182 out2 \ 183 out.expected \ 184 run*.log \ 185 run*.trs \ 186 test*.log \ 187 test*.trs \ 188 $(NULL) 189 190-include $(top_srcdir)/git.mk 191