meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I19b98dd511766ef0a8c08913436ac5fba22bf3ef
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index 48efab7..c4b16c8 100644
--- a/meson.build
+++ b/meson.build
@@ -1,14 +1,10 @@
project(
- 'phosphor-host-postd',
- 'cpp',
- default_options: [
- 'warning_level=3',
- 'werror=true',
- 'cpp_std=c++23'
- ],
- license: 'Apache-2.0',
- version: '1.0',
- meson_version: '>=1.1.1',
+ 'phosphor-host-postd',
+ 'cpp',
+ default_options: ['warning_level=3', 'werror=true', 'cpp_std=c++23'],
+ license: 'Apache-2.0',
+ version: '1.0',
+ meson_version: '>=1.1.1',
)
build_tests = get_option('tests')
@@ -28,76 +24,71 @@
snoopd_src = ['main.cpp']
snoopd_args = ''
if get_option('snoop').allowed()
- snoopd_src += 'ipmisnoop/ipmisnoop.cpp'
- add_project_arguments('-DENABLE_IPMI_SNOOP',language:'cpp')
- snoopd_args += ' -h "' + get_option('host-instances') + '"'
+ snoopd_src += 'ipmisnoop/ipmisnoop.cpp'
+ add_project_arguments('-DENABLE_IPMI_SNOOP', language: 'cpp')
+ snoopd_args += ' -h "' + get_option('host-instances') + '"'
elif get_option('snoop-device') != ''
- snoopd_args += '-b ' + get_option('post-code-bytes').to_string()
- snoopd_args += ' -d /dev/' + get_option('snoop-device')
- rate_limit = get_option('rate-limit')
- if rate_limit > 0
- snoopd_args += ' --rate-limit=' + rate_limit.to_string()
- endif
+ snoopd_args += '-b ' + get_option('post-code-bytes').to_string()
+ snoopd_args += ' -d /dev/' + get_option('snoop-device')
+ rate_limit = get_option('rate-limit')
+ if rate_limit > 0
+ snoopd_args += ' --rate-limit=' + rate_limit.to_string()
+ endif
endif
conf_data.set('SNOOPD_ARGS', snoopd_args)
configure_file(
- input: 'lpcsnoop.service.in',
- output: 'lpcsnoop.service',
- configuration: conf_data,
- install: true,
- install_dir: systemd.get_variable('systemdsystemunitdir'))
-
-executable(
- 'snoopd',
- snoopd_src,
- dependencies: [
- sdbusplus,
- sdeventplus,
- phosphor_dbus_interfaces,
- libgpiodcxx,
- ],
- install: true,
+ input: 'lpcsnoop.service.in',
+ output: 'lpcsnoop.service',
+ configuration: conf_data,
+ install: true,
+ install_dir: systemd.get_variable('systemdsystemunitdir'),
)
executable(
- 'snooper',
- 'example.cpp',
- dependencies: [
- sdbusplus,
- sdeventplus,
- phosphor_dbus_interfaces,
- ],
- install: true,
+ 'snoopd',
+ snoopd_src,
+ dependencies: [
+ sdbusplus,
+ sdeventplus,
+ phosphor_dbus_interfaces,
+ libgpiodcxx,
+ ],
+ install: true,
+)
+
+executable(
+ 'snooper',
+ 'example.cpp',
+ dependencies: [sdbusplus, sdeventplus, phosphor_dbus_interfaces],
+ install: true,
)
if get_option('7seg').allowed()
- udevdir = dependency('udev', required : false).get_variable('udevdir')
- assert(udevdir != '', 'Cannot find udevdir')
- install_data(['80-7seg.rules'], install_dir : udevdir)
+ udevdir = dependency('udev', required: false).get_variable('udevdir')
+ assert(udevdir != '', 'Cannot find udevdir')
+ install_data(['80-7seg.rules'], install_dir: udevdir)
- install_data(
- ['postcode-7seg@.service'],
- install_dir: systemd.get_variable('systemdsystemunitdir')
- )
+ install_data(
+ ['postcode-7seg@.service'],
+ install_dir: systemd.get_variable('systemdsystemunitdir'),
+ )
- executable(
- 'postcode_7seg',
- '7seg.cpp',
- dependencies: [
- sdbusplus,
- phosphor_dbus_interfaces,
- ],
- install: true,
- )
+ executable(
+ 'postcode_7seg',
+ '7seg.cpp',
+ dependencies: [sdbusplus, phosphor_dbus_interfaces],
+ install: true,
+ )
endif
install_headers(
- 'lpcsnoop/snoop.hpp',
- 'lpcsnoop/snoop_listen.hpp',
- subdir: 'lpcsnoop')
+ 'lpcsnoop/snoop.hpp',
+ 'lpcsnoop/snoop_listen.hpp',
+ subdir: 'lpcsnoop',
+)
if build_tests.allowed()
- subdir('test')
+ subdir('test')
endif
diff --git a/meson.options b/meson.options
index 9e0ef64..a72a26e 100644
--- a/meson.options
+++ b/meson.options
@@ -26,17 +26,13 @@
type: 'string',
value: 'multi-user.target',
)
-option(
- '7seg', type: 'feature', description: 'Enable building 7seg POST daemon.',
-)
-option(
- 'tests', type: 'feature', description: 'Build tests.',
-)
+option('7seg', type: 'feature', description: 'Enable building 7seg POST daemon.')
+option('tests', type: 'feature', description: 'Build tests.')
option(
'rate-limit',
description: 'Maximum number of POST codes to read from snoop device every'
+ 'second. Value of 0 disables rate limiting.',
type: 'integer',
min: 0,
- value: 1000
+ value: 1000,
)
diff --git a/test/meson.build b/test/meson.build
index 13809f1..1dc52ee 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -3,18 +3,17 @@
phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
sdbusplus = dependency('sdbusplus')
-tests = [
- 'post_reporter_test',
-]
+tests = ['post_reporter_test']
foreach t : tests
- test(t, executable(t.underscorify(), t + '.cpp',
- include_directories: postd_headers,
- implicit_include_directories: false,
- dependencies: [
- gtest,
- gmock,
- phosphor_dbus_interfaces,
- sdbusplus,
- ]))
+ test(
+ t,
+ executable(
+ t.underscorify(),
+ t + '.cpp',
+ include_directories: postd_headers,
+ implicit_include_directories: false,
+ dependencies: [gtest, gmock, phosphor_dbus_interfaces, sdbusplus],
+ ),
+ )
endforeach