mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
gio/tests/meson: Always generate desktop files for local builds
We were generating .desktop files with different content when installed tests were enabled, and thus making impossible to test some cases because there was no built file until installed. To avoid this, always generate both versions of desktop files while install only the one containing the install path prefix if needed.
This commit is contained in:
parent
359c705fc6
commit
e9cbcfff80
@ -542,33 +542,36 @@ if host_machine.system() != 'windows'
|
||||
endif
|
||||
|
||||
appinfo_test_desktop_files = [
|
||||
'appinfo-test-gnome.desktop',
|
||||
'appinfo-test-notgnome.desktop',
|
||||
'appinfo-test.desktop',
|
||||
'appinfo-test2.desktop',
|
||||
'appinfo-test-gnome',
|
||||
'appinfo-test-notgnome',
|
||||
'appinfo-test',
|
||||
'appinfo-test2',
|
||||
]
|
||||
|
||||
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
|
||||
input_desktop_file = appinfo_test_desktop_file + '.desktop.in'
|
||||
output_desktop_file = appinfo_test_desktop_file + '.desktop'
|
||||
configure_file(
|
||||
input: input_desktop_file,
|
||||
output: output_desktop_file,
|
||||
configuration: {
|
||||
'installed_tests_dir' : meson.current_build_dir(),
|
||||
},
|
||||
)
|
||||
|
||||
if installed_tests_enabled
|
||||
configure_file(
|
||||
input: appinfo_test_desktop_file + '.in',
|
||||
output: appinfo_test_desktop_file,
|
||||
installed_desktop = configure_file(
|
||||
input: input_desktop_file,
|
||||
output: appinfo_test_desktop_file + '-installed.desktop',
|
||||
configuration: {
|
||||
'installed_tests_dir' : installed_tests_execdir,
|
||||
},
|
||||
)
|
||||
|
||||
install_data(installed_desktop,
|
||||
install_dir: installed_tests_execdir,
|
||||
install_tag: 'tests',
|
||||
configuration: cdata,
|
||||
)
|
||||
else
|
||||
configure_file(
|
||||
input: appinfo_test_desktop_file + '.in',
|
||||
output: appinfo_test_desktop_file,
|
||||
configuration: cdata,
|
||||
rename: output_desktop_file,
|
||||
)
|
||||
endif
|
||||
endforeach
|
||||
|
Loading…
x
Reference in New Issue
Block a user