mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-25 22:40:50 +00:00

We only had to pile everything into the src/fuzzing/firmware directory because honggfuzz could not cope with more than one input path. This way each plugin is self contained and easy to copy. Also, install the fuzzing builder objects as this fixes the installed tests when srcdir does not exist. Based on a patch by Jan Tojnar <jtojnar@gmail.com>, many thanks.
80 lines
1.8 KiB
Meson
80 lines
1.8 KiB
Meson
if get_option('plugin_synaptics_mst')
|
|
if not get_option('gudev')
|
|
error('gudev is required for plugin_synaptics_mst')
|
|
endif
|
|
cargs = ['-DG_LOG_DOMAIN="FuPluginSynapticsMST"']
|
|
|
|
install_data(['synaptics-mst.quirk'],
|
|
install_dir: join_paths(datadir, 'fwupd', 'quirks.d')
|
|
)
|
|
|
|
shared_module('fu_plugin_synaptics_mst',
|
|
fu_hash,
|
|
sources : [
|
|
'fu-plugin-synaptics-mst.c',
|
|
'fu-synaptics-mst-common.c',
|
|
'fu-synaptics-mst-connection.c',
|
|
'fu-synaptics-mst-device.c',
|
|
'fu-synaptics-mst-firmware.c', # fuzzing
|
|
],
|
|
include_directories : [
|
|
root_incdir,
|
|
fwupd_incdir,
|
|
fwupdplugin_incdir,
|
|
],
|
|
install : true,
|
|
install_dir: plugin_dir,
|
|
c_args : [
|
|
cargs,
|
|
],
|
|
link_with : [
|
|
fwupd,
|
|
fwupdplugin,
|
|
],
|
|
dependencies : [
|
|
plugin_deps,
|
|
],
|
|
)
|
|
|
|
if get_option('tests')
|
|
install_data(['tests/synaptics-mst.builder.xml'],
|
|
install_dir: join_paths(installed_test_datadir, 'tests'))
|
|
env = environment()
|
|
env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
|
env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
|
env.set('FWUPD_LOCALSTATEDIR', '/tmp/fwupd-self-test/var')
|
|
cargs += '-DPLUGINSOURCEDIR="' + meson.current_source_dir() + '"'
|
|
e = executable(
|
|
'synaptics-mst-self-test',
|
|
fu_hash,
|
|
sources : [
|
|
'fu-self-test.c',
|
|
'fu-synaptics-mst-common.c',
|
|
'fu-synaptics-mst-connection.c',
|
|
'fu-synaptics-mst-device.c',
|
|
'fu-synaptics-mst-firmware.c',
|
|
],
|
|
include_directories : [
|
|
root_incdir,
|
|
fwupd_incdir,
|
|
fwupdplugin_incdir,
|
|
],
|
|
dependencies : [
|
|
plugin_deps,
|
|
sqlite,
|
|
valgrind,
|
|
],
|
|
link_with : [
|
|
fwupd,
|
|
fwupdplugin,
|
|
],
|
|
c_args : [
|
|
cargs,
|
|
],
|
|
install : true,
|
|
install_dir : installed_test_bindir,
|
|
)
|
|
test('synaptics-mst-self-test', e, env: env)
|
|
endif
|
|
endif
|