meson: build tests for nspawn even -Dnspawn= is disabled

Follow-up for d95818f522.
Fixes #36880.
This commit is contained in:
Yu Watanabe
2025-04-16 23:43:33 +09:00
committed by Zbigniew Jędrzejewski-Szmek
parent a30684b983
commit 39dd06dbc4
2 changed files with 2 additions and 5 deletions

View File

@@ -1,9 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
if conf.get('ENABLE_NSPAWN') != 1
subdir_done()
endif
libnspawn_core_sources = files(
'nspawn-bind-user.c',
'nspawn-cgroup.c',
@@ -52,6 +48,7 @@ executables += [
executable_template + {
'name' : 'systemd-nspawn',
'public' : true,
'conditions' : ['ENABLE_NSPAWN'],
'sources' : files('nspawn.c'),
'link_with' : nspawn_libs,
'dependencies' : [

View File

@@ -60,7 +60,7 @@ sanitize_address_undefined = custom_target(
'fuzzers',
' '.join(fuzz_c_args + '-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION'),
' '.join(fuzz_cpp_args + '-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION'),
'-Dfuzz-tests=true -Db_lundef=false -Db_sanitize=address,undefined -Dnspawn=enabled --optimization=@0@ @1@ --auto-features=@2@'.format(
'-Dfuzz-tests=true -Db_lundef=false -Db_sanitize=address,undefined --optimization=@0@ @1@ --auto-features=@2@'.format(
get_option('optimization'),
get_option('werror') ? '--werror' : '',
sanitize_auto_features