• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if conf.get('HAVE_GLIB', 0) == 0
2  message('You need to have glib support enabled to run test/api tests')
3  subdir_done()
4endif
5
6tests = [
7  'test-aat-layout.c',
8  'test-baseline.c',
9  'test-blob.c',
10  'test-buffer.c',
11  'test-c.c',
12  'test-collect-unicodes.c',
13  'test-cplusplus.cc',
14  'test-common.c',
15  'test-draw.c',
16  'test-font.c',
17  'test-font-scale.c',
18  'test-map.c',
19  'test-object.c',
20  'test-ot-alternates.c',
21  'test-ot-collect-glyphs.c',
22  'test-ot-color.c',
23  'test-ot-face.c',
24  'test-ot-glyphname.c',
25  'test-ot-layout.c',
26  'test-ot-ligature-carets.c',
27  'test-ot-name.c',
28  'test-ot-meta.c',
29  'test-ot-metrics.c',
30  'test-ot-tag.c',
31  'test-ot-extents-cff.c',
32  'test-ot-metrics-tt-var.c',
33  'test-set.c',
34  'test-shape.c',
35  'test-style.c',
36  'test-subset.c',
37  'test-subset-cmap.c',
38  'test-subset-drop-tables.c',
39  'test-subset-glyf.c',
40  'test-subset-hdmx.c',
41  'test-subset-hmtx.c',
42  'test-subset-nameids.c',
43  'test-subset-os2.c',
44  'test-subset-post.c',
45  'test-subset-vmtx.c',
46  'test-subset-cff1.c',
47  'test-subset-cff2.c',
48  'test-subset-gvar.c',
49  'test-subset-hvar.c',
50  'test-subset-vvar.c',
51  'test-subset-sbix.c',
52  'test-subset-gpos.c',
53  'test-subset-colr.c',
54  'test-subset-cbdt.c',
55  'test-unicode.c',
56  'test-var-coords.c',
57  'test-version.c',
58]
59
60if conf.get('HAVE_FREETYPE', 0) == 1
61  tests += 'test-ot-math.c'
62endif
63
64if conf.get('HAVE_FREETYPE', 0) == 1 and conf.get('HAVE_PTHREAD', 0) == 1
65  tests += 'test-multithread.c'
66endif
67
68# Default test running environment
69env = environment()
70env.set('MALLOC_CHECK_', '2')
71env.set('G_DEBUG', 'gc-friendly')
72env.set('G_SLICE', 'always-malloc')
73env.set('G_TEST_SRCDIR', meson.current_source_dir())
74env.set('G_TEST_BUILDDIR', meson.current_build_dir())
75
76foreach source : tests
77  test_name = source.split('.')[0]
78
79  deps = [glib_dep, freetype_dep, thread_dep, libharfbuzz_dep, libharfbuzz_icu_dep]
80  suite = ['api']
81  if test_name.contains('-subset')
82    deps += libharfbuzz_subset_dep
83    suite += 'subset'
84  endif
85
86  test(test_name, executable(test_name, source,
87    include_directories: [incconfig],
88    dependencies: deps,
89    install: false,
90  ), env: env, suite: suite)
91endforeach
92