summaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-05-19 14:15:35 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-19 17:32:28 +0100
commit386939f9d576e8ac956f88fd85f87d1fba76e9ed (patch)
tree5eec82eaab7e3547741630daf9d944e627186a62 /tests/meson.build
parent09623d50ac8afd9b246e571372972142af5daaa3 (diff)
downloadpango-386939f9d576e8ac956f88fd85f87d1fba76e9ed.tar.gz
meson: Install tests and additional data
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build74
1 files changed, 73 insertions, 1 deletions
diff --git a/tests/meson.build b/tests/meson.build
index d69a0d0d..a4df3bc0 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -43,15 +43,87 @@ if cairo_dep.found()
]
endif
+installed_test_data = [
+ 'boundaries.utf8',
+ 'GraphemeBreakTest.txt',
+]
+
+test_layouts_data = [
+ 'layouts/valid-1',
+ 'layouts/valid-2',
+]
+
+test_markups_data = [
+ 'markups/fail-1',
+ 'markups/fail-2',
+ 'markups/fail-3',
+ 'markups/fail-4',
+ 'markups/fail-5',
+ 'markups/valid-1',
+ 'markups/valid-2',
+ 'markups/valid-3',
+ 'markups/valid-4',
+ 'markups/valid-5',
+ 'markups/valid-6',
+ 'markups/valid-7',
+ 'markups/valid-8',
+ 'markups/valid-9',
+]
+
+installed_test_layouts_data = []
+foreach d: test_layouts_data
+ installed_test_layouts_data += d + '.markup'
+ installed_test_layouts_data += d + '.expected'
+endforeach
+
+installed_test_markups_data = []
+foreach d: test_markups_data
+ installed_test_markups_data += d + '.markup'
+ installed_test_markups_data += d + '.expected'
+endforeach
+
+installed_test_datadir = join_paths(pango_datadir, 'installed-tests', 'pango')
+installed_test_bindir = join_paths(pango_libexecdir, 'installed-tests', 'pango')
+
+install_data(installed_test_data, install_dir: installed_test_bindir)
+install_data(installed_test_layouts_data, install_dir: join_paths(installed_test_bindir, 'layouts'))
+install_data(installed_test_markups_data, install_dir: join_paths(installed_test_bindir, 'markups'))
+
+python = import('python3').find_python()
+gen_installed_test = files([ 'gen-installed-test.py' ])
+gen_all_unicode = files([ 'gen-all-unicode.py' ])
+
+custom_target('all-unicode',
+ output: 'all-unicode.txt',
+ command: [
+ python, gen_all_unicode, '@OUTPUT@'
+ ],
+ install: true,
+ install_dir: installed_test_bindir)
+
foreach t: tests
name = t[0]
src = t.get(1, [ '@0@.c'.format(name) ])
deps = t.get(2, [ libpango_dep ])
+ custom_target(name + '.test',
+ output: name + '.test',
+ command: [
+ python, gen_installed_test,
+ installed_test_bindir,
+ name,
+ '@OUTDIR@',
+ ],
+ install: true,
+ install_dir: installed_test_datadir)
+
bin = executable(name, src,
dependencies: deps,
include_directories: root_inc,
c_args: common_cflags + pango_debug_cflags + test_cflags,
- cpp_args: common_cppflags + pango_debug_cflags + test_cflags)
+ cpp_args: common_cppflags + pango_debug_cflags + test_cflags,
+ install: true,
+ install_dir: installed_test_bindir)
+
test(name, bin, env: test_env)
endforeach