mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
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
This commit is contained in:
parent
a050dc507c
commit
311efaae25
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user