| From d8a716c542459b726c04f981142512a88e999901 Mon Sep 17 00:00:00 2001 |
| From: Guangzong Chen <guangzong@google.com> |
| Date: Fri, 11 Sep 2026 18:02:00 +0000 |
| Subject: [PATCH] meson: skip tests and examples when built as subproject |
| |
| When libnvme is consumed as a subproject (e.g. in dbus-sensors), |
| its internal unit tests and examples should not be built or executed |
| as part of the parent project's test suite. |
| |
| Upstream-Status: Inappropriate [subproject build flag] |
| Signed-off-by: Guangzong Chen <guangzong@google.com> |
| --- |
| meson.build | 6 ++++-- |
| 1 file changed, 4 insertions(+), 2 deletions(-) |
| |
| diff --git a/meson.build b/meson.build |
| index f867b45..c8ef461 100644 |
| --- a/meson.build |
| +++ b/meson.build |
| @@ -226,8 +226,10 @@ incdir = include_directories(['.', 'ccan', 'src']) |
| subdir('ccan') |
| subdir('src') |
| subdir('libnvme') |
| -subdir('test') |
| -subdir('examples') |
| +if not meson.is_subproject() |
| + subdir('test') |
| + subdir('examples') |
| +endif |
| subdir('doc') |
| |
| ################################################################################ |
| -- |
| 2.46.0 |