mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-28 15:05:53 +00:00

This allows us to override the location we load data files from, which allows us to do more kinds of installed tests in the future. Also, move the global data/tests content into the place that it is used as it was getting impossible to manage.
65 lines
1.2 KiB
Meson
65 lines
1.2 KiB
Meson
if get_option('gudev')
|
|
cargs = ['-DG_LOG_DOMAIN="FuPluginAta"']
|
|
|
|
install_data([
|
|
'ata.quirk',
|
|
],
|
|
install_dir: join_paths(datadir, 'fwupd', 'quirks.d')
|
|
)
|
|
|
|
shared_module('fu_plugin_ata',
|
|
fu_hash,
|
|
sources : [
|
|
'fu-plugin-ata.c',
|
|
'fu-ata-device.c',
|
|
],
|
|
include_directories : [
|
|
root_incdir,
|
|
fwupd_incdir,
|
|
fwupdplugin_incdir,
|
|
],
|
|
install : true,
|
|
install_dir: plugin_dir,
|
|
c_args : [
|
|
cargs,
|
|
'-DLOCALSTATEDIR="' + localstatedir + '"',
|
|
],
|
|
link_with : [
|
|
fwupd,
|
|
fwupdplugin,
|
|
],
|
|
dependencies : [
|
|
plugin_deps,
|
|
],
|
|
)
|
|
|
|
if get_option('tests')
|
|
env = environment()
|
|
env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
|
env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
|
e = executable(
|
|
'ata-self-test',
|
|
fu_hash,
|
|
sources : [
|
|
'fu-self-test.c',
|
|
'fu-ata-device.c',
|
|
],
|
|
include_directories : [
|
|
root_incdir,
|
|
fwupd_incdir,
|
|
fwupdplugin_incdir,
|
|
],
|
|
dependencies : [
|
|
plugin_deps,
|
|
],
|
|
link_with : [
|
|
fwupd,
|
|
fwupdplugin,
|
|
],
|
|
install : true,
|
|
install_dir : installed_test_bindir,
|
|
)
|
|
test('ata-self-test', e, env : env) # added to installed-tests
|
|
endif
|
|
endif
|