mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
tests: Avoid chdir() call at the start of appinfo tests
By encoding the path to the appinfo-test binary in the .desktop files, we can avoid a chdir() call in the tests, which was a bit ugly. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://gitlab.gnome.org/GNOME/glib/issues/538
This commit is contained in:
@@ -395,15 +395,35 @@ if host_machine.system() != 'windows'
|
||||
}
|
||||
endif
|
||||
|
||||
appinfo_test_desktop_files = [
|
||||
'appinfo-test-gnome.desktop',
|
||||
'appinfo-test-notgnome.desktop',
|
||||
'appinfo-test.desktop',
|
||||
'appinfo-test2.desktop',
|
||||
]
|
||||
|
||||
cdata = configuration_data()
|
||||
if installed_tests_enabled
|
||||
cdata.set('installed_tests_dir', installed_tests_execdir)
|
||||
else
|
||||
cdata.set('installed_tests_dir', meson.current_build_dir())
|
||||
endif
|
||||
|
||||
foreach appinfo_test_desktop_file : appinfo_test_desktop_files
|
||||
configure_file(
|
||||
input: appinfo_test_desktop_file + '.in',
|
||||
output: appinfo_test_desktop_file,
|
||||
install_dir: installed_tests_execdir,
|
||||
install: installed_tests_enabled,
|
||||
configuration: cdata,
|
||||
)
|
||||
endforeach
|
||||
|
||||
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,
|
||||
|
Reference in New Issue
Block a user