diff options
author | Luca Boccassi <bluca@debian.org> | 2024-02-13 14:43:49 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-02-14 12:41:09 +0100 |
commit | 311efaae253f2c7d317f3f296aac16b19e622bb1 (patch) | |
tree | 61495b5cf3ccd1a27a27aeb208158144a461c00f /meson.build | |
parent | update TODO (diff) | |
download | systemd-311efaae253f2c7d317f3f296aac16b19e622bb1.tar.xz systemd-311efaae253f2c7d317f3f296aac16b19e622bb1.zip |
meson: do not attempt to install tests when they are disabled
If -Dtests=false but -Dinstall-tests=true the build will fail, as some tests will
be pulled in the build but not their prerequisites. It doesn't make sense to ask
for tests to be installed if they are disabled.
FAILED: test-acd
cc -o test-acd test-acd.p/src_libsystemd-network_test-acd.c.o -flto -Wl,--as-needed -Wl,--no-undefined -pie -fstack-protector -Wl,-z,relro -specs=/usr/share/debhelper/dh_package_notes/debian-package-notes.specs -g -O2 -ffile-prefix-map=/tmp/s=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -ffat-lto-objects -Wdate-time -D_FORTIFY_SOURCE=2 '-Wl,-rpath,$ORIGIN/src/shared:XXXXXXXXXXXXXXX' -Wl,-rpath-link,/tmp/s/obj-x86_64-linux-gnu/src/shared -Wl,--start-group src/shared/libsystemd-shared-255.so src/libsystemd-network/libsystemd-network.a -Wl,--end-group -Wl,--fatal-warnings -Wl,-z,now -Wl,-z,relro -Wl,--warn-common -Wl,--gc-sections -Wl,--fatal-warnings -Wl,-z,now -Wl,-z,relro -Wl,--warn-common -Wl,--gc-sections
/usr/bin/ld: /tmp/cc0oYwFZ.ltrans0.ltrans.o: in function `main':
./obj-x86_64-linux-gnu/./obj-x86_64-linux-gnu/<artificial>:85:(.text.startup+0x33): undefined reference to `test_setup_logging'
collect2: error: ld returned 1 exit status
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meson.build b/meson.build index c031db78a7..ff79efd989 100644 --- a/meson.build +++ b/meson.build @@ -313,7 +313,7 @@ meson_build_sh = find_program('tools/meson-build.sh') want_tests = get_option('tests') slow_tests = want_tests != 'false' and get_option('slow-tests') fuzz_tests = want_tests != 'false' and get_option('fuzz-tests') -install_tests = get_option('install-tests') +install_tests = want_tests != 'false' and get_option('install-tests') if add_languages('cpp', native : false, required : fuzzer_build) # Used only for tests |