Meson: Fix missing files when installing tests

Closes #1527
This commit is contained in:
Xavier Claessens 2018-09-19 11:53:07 -04:00
parent f50309a80e
commit 96fafcfe92
4 changed files with 57 additions and 14 deletions

View File

@ -14,11 +14,12 @@ gdbus_example_objectmanager_generated = custom_target('gdbus-example-objectmanag
'--generate-docbook', 'gdbus-example-objectmanager-generated', '--generate-docbook', 'gdbus-example-objectmanager-generated',
'@INPUT@']) '@INPUT@'])
libgdbus_example_objectmanager = library('libgdbus-example-objectmanager', libgdbus_example_objectmanager = library('gdbus-example-objectmanager',
gdbus_example_objectmanager_generated, gdbus_example_objectmanager_generated,
c_args : gio_c_args, c_args : gio_c_args,
dependencies : [libglib_dep, libgmodule_dep, libgobject_dep, libgio_dep], dependencies : [libglib_dep, libgmodule_dep, libgobject_dep, libgio_dep],
install : false) install : installed_tests_enabled,
install_dir : installed_tests_execdir)
libgdbus_example_objectmanager_dep = declare_dependency(sources : gdbus_example_objectmanager_generated, libgdbus_example_objectmanager_dep = declare_dependency(sources : gdbus_example_objectmanager_generated,
link_with : libgdbus_example_objectmanager) link_with : libgdbus_example_objectmanager)

View File

@ -80,6 +80,7 @@ gio_tests = [{
test_extra_programs = [{ test_extra_programs = [{
'gdbus-connection-flush-helper' : {}, 'gdbus-connection-flush-helper' : {},
'gdbus-testserver' : {}, 'gdbus-testserver' : {},
'gsubprocess-testprog' : {},
}] }]
test_env = environment() test_env = environment()
@ -254,9 +255,10 @@ if host_machine.system() != 'windows'
# This test is currently unreliable # This test is currently unreliable
executable('gdbus-overflow', 'gdbus-overflow.c', executable('gdbus-overflow', 'gdbus-overflow.c',
install : false,
c_args : test_c_args, c_args : test_c_args,
dependencies : common_gio_tests_deps) dependencies : common_gio_tests_deps,
install_dir : installed_tests_execdir,
install : installed_tests_enabled)
gio_tests += [{ gio_tests += [{
'gdbus-connection-flush' : { 'gdbus-connection-flush' : {
@ -318,7 +320,6 @@ test_extra_programs += [{
'gdbus-example-subtree' : {'install' : false}, 'gdbus-example-subtree' : {'install' : false},
'gdbus-example-watch-name' : {'install' : false}, 'gdbus-example-watch-name' : {'install' : false},
'gdbus-example-watch-proxy' : {'install' : false}, 'gdbus-example-watch-proxy' : {'install' : false},
'gsubprocess-testprog' : {'install' : false},
'httpd' : {'install' : false}, 'httpd' : {'install' : false},
'proxy' : {'install' : false}, 'proxy' : {'install' : false},
'resolver' : {'install' : false}, 'resolver' : {'install' : false},
@ -357,6 +358,25 @@ if host_machine.system() != 'windows'
}] }]
endif endif
if installed_tests_enabled
install_data(
'contexts.c',
'g-icon.c',
'appinfo-test-actions.desktop',
'appinfo-test-gnome.desktop',
'appinfo-test-notgnome.desktop',
'appinfo-test.desktop',
'appinfo-test2.desktop',
'file.c',
'org.gtk.test.dbusappinfo.desktop',
install_dir : installed_tests_execdir,
)
install_subdir('x-content', install_dir : installed_tests_execdir)
install_subdir('desktop-files', install_dir : installed_tests_execdir)
install_subdir('thumbnails', install_dir : installed_tests_execdir)
install_subdir('cert-tests', install_dir : installed_tests_execdir)
endif
if not meson.is_cross_build() or meson.has_exe_wrapper() if not meson.is_cross_build() or meson.has_exe_wrapper()
plugin_resources_c = custom_target('plugin-resources.c', plugin_resources_c = custom_target('plugin-resources.c',
@ -371,7 +391,10 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
shared_module('resourceplugin', 'resourceplugin.c', plugin_resources_c, shared_module('resourceplugin', 'resourceplugin.c', plugin_resources_c,
link_args : export_dynamic_ldflags, link_args : export_dynamic_ldflags,
dependencies : common_gio_tests_deps) dependencies : common_gio_tests_deps,
install_dir : installed_tests_execdir,
install : installed_tests_enabled
)
test_gresource = custom_target('test.gresource', test_gresource = custom_target('test.gresource',
input : 'test.gresource.xml', input : 'test.gresource.xml',
@ -380,7 +403,9 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
'--target=@OUTPUT@', '--target=@OUTPUT@',
'--sourcedir=' + meson.current_source_dir(), '--sourcedir=' + meson.current_source_dir(),
'--sourcedir=' + meson.current_build_dir(), '--sourcedir=' + meson.current_build_dir(),
'@INPUT@']) '@INPUT@'],
install_dir : installed_tests_execdir,
install : installed_tests_enabled)
test_resources2_c = custom_target('test_resources2.c', test_resources2_c = custom_target('test_resources2.c',
input : 'test3.gresource.xml', input : 'test3.gresource.xml',

View File

@ -1,11 +1,13 @@
libtestmodulea = library('testmodulea', 'test-module-a.c', libtestmodulea = shared_module('testmodulea', 'test-module-a.c',
install : false,
dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep], dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep],
c_args : [ ] c_args : [ ],
install : installed_tests_enabled,
install_dir : join_paths(installed_tests_execdir, 'modules'),
) )
libtestmoduleb = library('testmoduleb', 'test-module-b.c', libtestmoduleb = shared_module('testmoduleb', 'test-module-b.c',
install : false,
dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep], dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep],
c_args : [ ] c_args : [ ],
install : installed_tests_enabled,
install_dir : join_paths(installed_tests_execdir, 'modules'),
) )

View File

@ -129,6 +129,21 @@ glib_tests = {
}, },
} }
if installed_tests_enabled
install_data(
'keyfiletest.ini',
'pages.ini',
'keyfile.c',
'empty',
'4096-random-bytes',
'echo-script',
'echo-script.bat',
install_dir : installed_tests_execdir,
)
install_subdir('bookmarks', install_dir : installed_tests_execdir)
install_subdir('markups', install_dir : installed_tests_execdir)
endif
# Not entirely random of course, but at least it changes over time # Not entirely random of course, but at least it changes over time
random_number = minor_version + meson.version().split('.').get(1).to_int() random_number = minor_version + meson.version().split('.').get(1).to_int()