meson: Format build files with `meson format`
Additionally, add the formatting command to `scripts/pre-submit` so it's
run by OpenBMC's CI (via `scripts/run-ci`).
Change-Id: Ifb8fc06106b8cfa9155e986528b769a5ca450b4c
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/tests/dsp/meson.build b/tests/dsp/meson.build
index c457260..dd2b5b0 100644
--- a/tests/dsp/meson.build
+++ b/tests/dsp/meson.build
@@ -1,15 +1,19 @@
tests += [
- 'dsp/base',
- 'dsp/bios_table',
- 'dsp/bios',
- 'dsp/firmware_update',
- 'dsp/fru',
- 'dsp/pdr',
- 'dsp/platform',
+ 'dsp/base',
+ 'dsp/bios_table',
+ 'dsp/bios',
+ 'dsp/firmware_update',
+ 'dsp/fru',
+ 'dsp/pdr',
+ 'dsp/platform',
]
-test('dsp/bios_table_iter',
- executable('bios_table_iter',
- 'bios_table_iter.c',
- implicit_include_directories: false,
- include_directories: test_include_dirs))
+test(
+ 'dsp/bios_table_iter',
+ executable(
+ 'bios_table_iter',
+ 'bios_table_iter.c',
+ implicit_include_directories: false,
+ include_directories: test_include_dirs,
+ ),
+)
diff --git a/tests/meson.build b/tests/meson.build
index 0a2e811..a32cf8d 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -3,52 +3,55 @@
if not gtest_dep.found() or not gmock_dep.found()
gtest_proj = import('cmake').subproject('googletest', required: true)
gtest_dep = declare_dependency(
- dependencies: [
- dependency('threads'),
- gtest_proj.dependency('gtest'),
- gtest_proj.dependency('gtest_main'),
- ]
- )
- gmock_dep = gtest_proj.dependency('gmock')
+ dependencies: [
+ dependency('threads'),
+ gtest_proj.dependency('gtest'),
+ gtest_proj.dependency('gtest_main'),
+ ],
+ )
+ gmock_dep = gtest_proj.dependency('gmock')
endif
-test_include_dirs = [ libpldm_include_dir, include_directories('../src') ]
+test_include_dirs = [libpldm_include_dir, include_directories('../src')]
-tests = [
- 'instance-id',
- 'msgbuf',
- 'responder',
- 'utils',
-]
+tests = ['instance-id', 'msgbuf', 'responder', 'utils']
subdir('dsp')
# The 'test' transport APIs will never be marked stable as they are just for
# testing.
if get_option('abi').contains('testing')
- subdir('transport')
+ subdir('transport')
endif
if get_option('oem-ibm').allowed()
- subdir('oem/ibm')
+ subdir('oem/ibm')
endif
if get_option('oem-meta').allowed()
- subdir('oem/meta')
+ subdir('oem/meta')
endif
foreach t : tests
- test(t, executable(t.underscorify(), t + '.cpp',
- implicit_include_directories: false,
- include_directories: test_include_dirs,
- dependencies: [
- libpldm_dep,
- gtest_dep,
- gmock_dep]),
- workdir: meson.current_source_dir())
+ test(
+ t,
+ executable(
+ t.underscorify(),
+ t + '.cpp',
+ implicit_include_directories: false,
+ include_directories: test_include_dirs,
+ dependencies: [libpldm_dep, gtest_dep, gmock_dep],
+ ),
+ workdir: meson.current_source_dir(),
+ )
endforeach
-test('msgbuf_generic', executable('msgbuf_generic',
- 'msgbuf_generic.c',
- implicit_include_directories: false,
- include_directories: test_include_dirs))
+test(
+ 'msgbuf_generic',
+ executable(
+ 'msgbuf_generic',
+ 'msgbuf_generic.c',
+ implicit_include_directories: false,
+ include_directories: test_include_dirs,
+ ),
+)
diff --git a/tests/oem/ibm/meson.build b/tests/oem/ibm/meson.build
index 389f83b..c38b644 100644
--- a/tests/oem/ibm/meson.build
+++ b/tests/oem/ibm/meson.build
@@ -1,4 +1 @@
-tests += [
- 'oem/ibm/fileio',
- 'oem/ibm/host',
-]
+tests += ['oem/ibm/fileio', 'oem/ibm/host']
diff --git a/tests/oem/meta/meson.build b/tests/oem/meta/meson.build
index 03c33f5..fc9d183 100644
--- a/tests/oem/meta/meson.build
+++ b/tests/oem/meta/meson.build
@@ -1,3 +1 @@
-tests += [
- 'oem/meta/fileio',
-]
+tests += ['oem/meta/fileio']
diff --git a/tests/transport/meson.build b/tests/transport/meson.build
index d4c27ee..6fb2b98 100644
--- a/tests/transport/meson.build
+++ b/tests/transport/meson.build
@@ -1,8 +1,8 @@
tests += [
- 'transport/transport',
- 'transport/send_recv_one',
- 'transport/send_recv_timeout',
- 'transport/send_recv_unwanted',
- 'transport/send_recv_wrong_command_code',
- 'transport/send_recv_wrong_pldm_type',
+ 'transport/transport',
+ 'transport/send_recv_one',
+ 'transport/send_recv_timeout',
+ 'transport/send_recv_unwanted',
+ 'transport/send_recv_wrong_command_code',
+ 'transport/send_recv_wrong_pldm_type',
]