Makefile.am 3.44 KB
Newer Older
Akira TAGOH's avatar
Akira TAGOH committed
1
check_SCRIPTS=run-test.sh
2 3 4 5 6 7 8
TEST_EXTENSIONS = \
	.sh \
	$(NULL)

AM_TESTS_ENVIRONMENT= \
	src=${srcdir}; export src; \
	EXEEXT=${EXEEXT}; export EXEEXT; \
9
	LOG_COMPILER=${LOG_COMPILER} ; export LOG_COMPILER; \
10 11
	$(NULL)

12
BUILT_SOURCES = $(builddir)/out.expected
13

14
SH_LOG_COMPILER = sh
15
if OS_WIN32
16
LOG_COMPILER = ${srcdir}/wrapper-script.sh
17
endif
Keith Packard's avatar
Keith Packard committed
18 19
TESTS=run-test.sh

20 21 22 23
TESTDATA =			\
	4x6.pcf			\
	8x16.pcf		\
	fonts.conf.in		\
24
	test-60-generic.json	\
25 26
	test-90-synthetic.json	\
	$(NULL)
27

28
if FREETYPE_PCF_LONG_FAMILY_NAMES
29 30
$(builddir)/out.expected: $(srcdir)/out.expected-long-family-names Makefile
	cp $(srcdir)/out.expected-long-family-names $(builddir)/out.expected
31
else
32 33
$(builddir)/out.expected: $(srcdir)/out.expected-no-long-family-names Makefile
	cp $(srcdir)/out.expected-no-long-family-names $(builddir)/out.expected
34 35
endif

36 37
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)

38
check_PROGRAMS =
Behdad Esfahbod's avatar
Behdad Esfahbod committed
39
if HAVE_PTHREAD
40
check_PROGRAMS += test-pthread
Behdad Esfahbod's avatar
Behdad Esfahbod committed
41 42 43 44 45
test_pthread_LDADD = $(top_builddir)/src/libfontconfig.la
# We don't enable this test by default because it will require config and fonts
# to meaningfully test anything, and we are not installed yet.
#TESTS += test-pthread
endif
46 47 48 49 50 51 52
check_PROGRAMS += test-bz89617
test_bz89617_CFLAGS = \
	-DSRCDIR="\"$(abs_srcdir)\""

test_bz89617_LDADD = $(top_builddir)/src/libfontconfig.la
TESTS += test-bz89617

53 54 55 56
check_PROGRAMS += test-bz131804
test_bz131804_LDADD = $(top_builddir)/src/libfontconfig.la
TESTS += test-bz131804

57 58
noinst_PROGRAMS = $(check_PROGRAMS)

59 60
if !OS_WIN32
check_PROGRAMS += test-migration
61
test_migration_LDADD = $(top_builddir)/src/libfontconfig.la
62
endif
Behdad Esfahbod's avatar
Behdad Esfahbod committed
63

64 65 66 67
check_PROGRAMS += test-bz96676
test_bz96676_LDADD = $(top_builddir)/src/libfontconfig.la
TESTS += test-bz96676

68 69 70 71
check_PROGRAMS += test-name-parse
test_name_parse_LDADD = $(top_builddir)/src/libfontconfig.la
TESTS += test-name-parse

Akira TAGOH's avatar
Akira TAGOH committed
72 73 74 75
if ENABLE_JSONC
check_PROGRAMS += test-conf
test_conf_CFLAGS = $(JSONC_CFLAGS)
test_conf_LDADD = $(top_builddir)/src/libfontconfig.la $(JSONC_LIBS)
76
TESTS += run-test-conf.sh
Akira TAGOH's avatar
Akira TAGOH committed
77 78
endif

79 80 81
check_PROGRAMS += test-bz106618
test_bz106618_LDADD = $(top_builddir)/src/libfontconfig.la

Akira TAGOH's avatar
Akira TAGOH committed
82
if !OS_WIN32
83 84 85 86 87 88 89 90 91 92 93
check_PROGRAMS += test-bz106632
test_bz106632_CFLAGS =					\
	-I$(top_builddir)				\
	-I$(top_builddir)/src				\
	-I$(top_srcdir)					\
	-I$(top_srcdir)/src				\
	-DFONTFILE='"$(abs_top_srcdir)/test/4x6.pcf"'	\
	-DHAVE_CONFIG_H					\
	$(NULL)
test_bz106632_LDADD = $(top_builddir)/src/libfontconfig.la
TESTS += test-bz106632
94
endif
95

96 97 98 99 100 101
check_PROGRAMS += test-issue107
test_issue107_LDADD =					\
	$(top_builddir)/src/libfontconfig.la		\
	$(NULL)
TESTS += test-issue107

102
if !ENABLE_SHARED
103
if !OS_WIN32
104 105 106 107 108 109 110 111 112 113 114 115 116
check_PROGRAMS += test-issue110
test_issue110_CFLAGS =					\
	-I$(top_builddir)				\
	-I$(top_builddir)/src				\
	-I$(top_srcdir)					\
	-I$(top_srcdir)/src				\
	-DHAVE_CONFIG_H					\
	-DFONTCONFIG_PATH='"$(BASECONFIGDIR)"'		\
	$(NULL)
test_issue110_LDADD =					\
	$(top_builddir)/src/libfontconfig.la		\
	$(NULL)
TESTS += test-issue110
117 118 119 120 121 122 123 124 125 126 127 128 129 130

check_PROGRAMS += test-d1f48f11
test_d1f48f11_CFLAGS =					\
	-I$(top_builddir)				\
	-I$(top_builddir)/src				\
	-I$(top_srcdir)					\
	-I$(top_srcdir)/src				\
	-DHAVE_CONFIG_H					\
	-DFONTCONFIG_PATH='"$(BASECONFIGDIR)"'		\
	$(NULL)
test_d1f48f11_LDADD =					\
	$(top_builddir)/src/libfontconfig.la		\
	$(NULL)
TESTS += test-d1f48f11
131
endif
132
endif
133

Akira TAGOH's avatar
Akira TAGOH committed
134
EXTRA_DIST=run-test.sh run-test-conf.sh $(LOG_COMPILER) $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names
135

Akira TAGOH's avatar
Akira TAGOH committed
136
CLEANFILES=out out1 out2 fonts.conf out.expected
137 138

-include $(top_srcdir)/git.mk