libpldm: Reorganize source and test files
Primarily this is about moving specification-specific files into
'dsp/' (in the "DMTF Standard Publication" sense[1]) subdirectories of
both src/ and tests/.
[1]: https://www.dmtf.org/sites/default/files/standards/documents/DSP4014_2.14.0.pdf
libpldm is a concrete C implementation of the PLDM family of
specifications. This invokes some accidental complexity[2] such as the
msgbuf APIs and other concerns.
[2]: https://en.wikipedia.org/wiki/No_Silver_Bullet
Separate the essential complexity (everything under the dsp/
subdirectories) from the accidental complexity (almost everything else).
While doing so, I took the opportunity to drop the 'libpldm_' prefix
and '_test' suffix from a variety of tests. The 'libpldm_' prefix is a
hangover from the days when libpldm was a subproject of OpenBMC's pldm
repo. The '_test' suffix feels redundant given the parent directory
path.
Note that we maintain separation of the src/ and tests/. The test suite
is implemented in C++ while libpldm's APIs are declared and defined in
C. The ability to chop all the tests and C++ out of the implementation
by ignoring a subtree seems like a desirable property when vendoring the
library into other projects.
Finally, update the x86_64 GCC ABI dump, as rearranging the source
causes a lot of churn in its definitions.
Change-Id: Icffcc6cf48b3101ecd38168827c0a81cffb8f083
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/tests/meson.build b/tests/meson.build
index 27103ef..0a2e811 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -12,21 +12,17 @@
gmock_dep = gtest_proj.dependency('gmock')
endif
+test_include_dirs = [ libpldm_include_dir, include_directories('../src') ]
tests = [
'instance-id',
- 'libpldm_base_test',
- 'libpldm_bios_table_test',
- 'libpldm_bios_test',
- 'libpldm_firmware_update_test',
- 'libpldm_fru_test',
- 'libpldm_pdr_test',
- 'libpldm_platform_test',
- 'libpldm_utils_test',
'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')
@@ -41,8 +37,6 @@
subdir('oem/meta')
endif
-test_include_dirs = [ libpldm_include_dir, include_directories('../src') ]
-
foreach t : tests
test(t, executable(t.underscorify(), t + '.cpp',
implicit_include_directories: false,
@@ -54,11 +48,6 @@
workdir: meson.current_source_dir())
endforeach
-test('bios_table_iter', executable('bios_table_iter',
- 'bios_table_iter.c',
- implicit_include_directories: false,
- include_directories: test_include_dirs))
-
test('msgbuf_generic', executable('msgbuf_generic',
'msgbuf_generic.c',
implicit_include_directories: false,