• 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-map.c',
18  'test-object.c',
19  'test-ot-alternates.c',
20  'test-ot-color.c',
21  'test-ot-face.c',
22  'test-ot-glyphname.c',
23  'test-ot-ligature-carets.c',
24  'test-ot-name.c',
25  'test-ot-meta.c',
26  'test-ot-metrics.c',
27  'test-ot-tag.c',
28  'test-ot-extents-cff.c',
29  'test-ot-metrics-tt-var.c',
30  'test-set.c',
31  'test-shape.c',
32  'test-style.c',
33  'test-subset.c',
34  'test-subset-cmap.c',
35  'test-subset-drop-tables.c',
36  'test-subset-glyf.c',
37  'test-subset-hdmx.c',
38  'test-subset-hmtx.c',
39  'test-subset-nameids.c',
40  'test-subset-os2.c',
41  'test-subset-post.c',
42  'test-subset-vmtx.c',
43  'test-subset-cff1.c',
44  'test-subset-cff2.c',
45  'test-subset-gvar.c',
46  'test-subset-hvar.c',
47  'test-subset-vvar.c',
48  'test-subset-sbix.c',
49  'test-subset-gpos.c',
50  'test-subset-colr.c',
51  'test-subset-cbdt.c',
52  'test-unicode.c',
53  'test-var-coords.c',
54  'test-version.c',
55]
56
57if conf.get('HAVE_FREETYPE', 0) == 1
58  tests += 'test-ot-math.c'
59endif
60
61if conf.get('HAVE_FREETYPE', 0) == 1 and conf.get('HAVE_PTHREAD', 0) == 1
62  tests += 'test-multithread.c'
63endif
64
65# Default test running environment
66env = environment()
67env.set('MALLOC_CHECK_', '2')
68env.set('G_DEBUG', 'gc-friendly')
69env.set('G_SLICE', 'always-malloc')
70env.set('G_TEST_SRCDIR', meson.current_source_dir())
71env.set('G_TEST_BUILDDIR', meson.current_build_dir())
72
73foreach source : tests
74  test_name = source.split('.')[0]
75
76  deps = [glib_dep, freetype_dep, thread_dep, libharfbuzz_dep, libharfbuzz_icu_dep]
77  suite = ['api']
78  if test_name.contains('-subset')
79    deps += libharfbuzz_subset_dep
80    suite += 'subset'
81  endif
82
83  test(test_name, executable(test_name, source,
84    include_directories: [incconfig],
85    dependencies: deps,
86    install: false,
87  ), env: env, suite: suite)
88endforeach
89