1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
tests = ['addressTest', 'boundingBoxTest', 'colorTest', 'osmNamesTest',
'placeIconsTest', 'placeZoomTest', 'timeTest', 'translationsTest',
'utilsTest', 'urisTest', 'wikipediaTest']
# suffix for source resources (so we get /org/gnome/Maps or
# /org/gnome/Maps/Devel, depending on the profile)
if (get_option('profile') == 'development')
suffix = '/Devel'
else
suffix = ''
endif
foreach test : tests
script_conf = configuration_data()
script_conf.set('GJS', gjs.full_path())
script_conf.set('PACKAGE_VERSION', version)
script_conf.set('libdir', libdir)
script_conf.set('prefix', prefix)
script_conf.set('name', test)
script_conf.set('suffix', suffix)
configure_file(
input: 'test.in',
output: test,
configuration: script_conf,
install: false,
install_dir: pkgdatadir
)
endforeach
sources_conf = configuration_data()
sources_conf.set('suffix', suffix)
# include test sources
sources_conf.set('testopencomment', '')
sources_conf.set('testclosecomment', '')
# generate combined GResource with source files and tests to use ES modules
gnome.compile_resources(
'test.src',
configure_file(
input: '../src/org.gnome.Maps.src.gresource.xml.in',
output: 'test.src.gresource.xml',
configuration: sources_conf
),
gresource_bundle: true,
install: false,
install_dir: meson.project_build_root(),
source_dir: ['../src', '../src/geojson-vt']
)
foreach test : tests
test(test, gjs,
args: ['tests/@0@'.format(test),
join_paths(meson.project_build_root(), 'tests', 'test.src.gresource')],
env: ['LANG=en_US.utf8', 'LC_ALL=en_US.utf8']
)
endforeach
|