mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
meson: disable _all_ tests when -Dtests=false
Back in 08318a2c5a
, value "false" was enabled for
'-Dtests=', but various tests were not conditionalized properly. So even with
-Dtests=false -Dslow-tests=false we'd run 120 tests. Let's make this consistent.
This commit is contained in:
parent
d3da291eb0
commit
938be08926
|
@ -36,9 +36,11 @@ endif
|
|||
############################################################
|
||||
|
||||
parse_hwdb_py = find_program('parse_hwdb.py')
|
||||
test('parse-hwdb',
|
||||
if want_tests != 'false'
|
||||
test('parse-hwdb',
|
||||
parse_hwdb_py,
|
||||
timeout : 90)
|
||||
endif
|
||||
|
||||
############################################################
|
||||
|
||||
|
|
28
meson.build
28
meson.build
|
@ -1504,9 +1504,12 @@ foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
|
|||
'rm $DESTDIR@0@/libnss_@1@.so'
|
||||
.format(rootlibdir, module))
|
||||
|
||||
if want_tests != 'false'
|
||||
test('dlopen-nss_' + module,
|
||||
test_dlopen,
|
||||
args : [nss.full_path()]) # path to dlopen must include a slash
|
||||
# path to dlopen must include a slash
|
||||
args : nss.full_path())
|
||||
endif
|
||||
endif
|
||||
endforeach
|
||||
|
||||
|
@ -1747,9 +1750,12 @@ if conf.get('ENABLE_LOGIND') == 1
|
|||
install : true,
|
||||
install_dir : pamlibdir)
|
||||
|
||||
if want_tests != 'false'
|
||||
test('dlopen-pam_systemd',
|
||||
test_dlopen,
|
||||
args : [pam_systemd.full_path()]) # path to dlopen must include a slash
|
||||
# path to dlopen must include a slash
|
||||
args : [pam_systemd.full_path()])
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -2436,10 +2442,12 @@ if conf.get('ENABLE_TMPFILES') == 1
|
|||
install_dir : rootbindir)
|
||||
public_programs += exe
|
||||
|
||||
if want_tests != 'false'
|
||||
test('test-systemd-tmpfiles',
|
||||
test_systemd_tmpfiles_py,
|
||||
args : exe.full_path())
|
||||
# https://github.com/mesonbuild/meson/issues/2681
|
||||
args : exe.full_path())
|
||||
endif
|
||||
endif
|
||||
|
||||
if conf.get('ENABLE_HWDB') == 1
|
||||
|
@ -2666,7 +2674,9 @@ exe = executable(
|
|||
link_with : [libsystemd],
|
||||
install : install_tests,
|
||||
install_dir : testsdir)
|
||||
test('test-libsystemd-sym', exe)
|
||||
if want_tests != 'false'
|
||||
test('test-libsystemd-sym', exe)
|
||||
endif
|
||||
|
||||
exe = executable(
|
||||
'test-libsystemd-static-sym',
|
||||
|
@ -2678,7 +2688,7 @@ exe = executable(
|
|||
build_by_default : static_libsystemd_pic,
|
||||
install : install_tests and static_libsystemd_pic,
|
||||
install_dir : testsdir)
|
||||
if static_libsystemd_pic
|
||||
if want_tests != 'false' and static_libsystemd_pic
|
||||
test('test-libsystemd-static-sym', exe)
|
||||
endif
|
||||
|
||||
|
@ -2690,7 +2700,9 @@ exe = executable(
|
|||
link_with : [libudev],
|
||||
install : install_tests,
|
||||
install_dir : testsdir)
|
||||
test('test-libudev-sym', exe)
|
||||
if want_tests != 'false'
|
||||
test('test-libudev-sym', exe)
|
||||
endif
|
||||
|
||||
exe = executable(
|
||||
'test-libudev-static-sym',
|
||||
|
@ -2701,7 +2713,7 @@ exe = executable(
|
|||
build_by_default : static_libudev_pic,
|
||||
install : install_tests and static_libudev_pic,
|
||||
install_dir : testsdir)
|
||||
if static_libudev_pic
|
||||
if want_tests != 'false' and static_libudev_pic
|
||||
test('test-libudev-static-sym', exe)
|
||||
endif
|
||||
|
||||
|
@ -2791,9 +2803,11 @@ meson_check_help = find_program('tools/meson-check-help.sh')
|
|||
|
||||
foreach exec : public_programs
|
||||
name = exec.full_path().split('/')[-1]
|
||||
if want_tests != 'false'
|
||||
test('check-help-' + name,
|
||||
meson_check_help,
|
||||
args : [exec.full_path()])
|
||||
endif
|
||||
endforeach
|
||||
|
||||
############################################################
|
||||
|
|
|
@ -169,9 +169,11 @@ if have_gnu_efi
|
|||
efi_ldflags + tuple[2] +
|
||||
['-lefi', '-lgnuefi', libgcc_file_name])
|
||||
|
||||
if want_tests != 'false'
|
||||
test('no-undefined-symbols-' + tuple[0],
|
||||
no_undefined_symbols,
|
||||
args : [so])
|
||||
endif
|
||||
|
||||
stub = custom_target(
|
||||
tuple[1],
|
||||
|
|
|
@ -65,10 +65,12 @@ endif
|
|||
foreach header : _systemd_headers
|
||||
foreach opt : opts
|
||||
name = ''.join([header, ':'] + opt)
|
||||
if want_tests != 'false'
|
||||
test('cc-' + name,
|
||||
check_compilation_sh,
|
||||
args : cc.cmd_array() + ['-c', '-x'] + opt +
|
||||
['-Werror', '-include',
|
||||
join_paths(meson.current_source_dir(), header)])
|
||||
endif
|
||||
endforeach
|
||||
endforeach
|
||||
|
|
|
@ -211,16 +211,20 @@ endif
|
|||
############################################################
|
||||
|
||||
rule_syntax_check_py = find_program('rule-syntax-check.py')
|
||||
test('rule-syntax-check',
|
||||
if want_tests != 'false'
|
||||
test('rule-syntax-check',
|
||||
rule_syntax_check_py,
|
||||
args : all_rules)
|
||||
endif
|
||||
|
||||
############################################################
|
||||
|
||||
if conf.get('HAVE_SYSV_COMPAT') == 1
|
||||
sysv_generator_test_py = find_program('sysv-generator-test.py')
|
||||
if want_tests != 'false'
|
||||
test('sysv-generator-test',
|
||||
sysv_generator_test_py)
|
||||
endif
|
||||
endif
|
||||
|
||||
############################################################
|
||||
|
@ -235,17 +239,21 @@ custom_target(
|
|||
|
||||
if perl.found()
|
||||
udev_test_pl = find_program('udev-test.pl')
|
||||
if want_tests != 'false'
|
||||
test('udev-test',
|
||||
udev_test_pl)
|
||||
endif
|
||||
else
|
||||
message('Skipping udev-test because perl is not available')
|
||||
endif
|
||||
|
||||
if conf.get('ENABLE_HWDB') == 1
|
||||
hwdb_test_sh = find_program('hwdb-test.sh')
|
||||
if want_tests != 'false'
|
||||
test('hwdb-test',
|
||||
hwdb_test_sh,
|
||||
timeout : 90)
|
||||
endif
|
||||
endif
|
||||
|
||||
subdir('fuzz-regressions')
|
||||
|
|
Loading…
Reference in a new issue