meson: set suite for all tests, and adjust suite for some tests

This commit is contained in:
Yu Watanabe 2023-06-27 01:28:32 +09:00
parent cbc55c4cce
commit dc4a00555a
3 changed files with 32 additions and 17 deletions

View file

@ -2712,7 +2712,8 @@ foreach dict : modules
test_dlopen, test_dlopen,
# path to dlopen must include a slash # path to dlopen must include a slash
args : lib.full_path(), args : lib.full_path(),
depends : lib) depends : lib,
suite : is_nss ? 'nss' : 'pam')
endif endif
endforeach endforeach
@ -2888,7 +2889,8 @@ if git.found()
test('check-includes', test('check-includes',
files('tools/check-includes.py'), files('tools/check-includes.py'),
args: all_files, args: all_files,
env : ['PROJECT_SOURCE_ROOT=@0@'.format(project_source_root)]) env : ['PROJECT_SOURCE_ROOT=@0@'.format(project_source_root)],
suite : 'headers')
endif endif
endif endif

View file

@ -15,5 +15,6 @@ if want_ukify and want_tests != 'false'
test('test-ukify', test('test-ukify',
files('test_ukify.py'), files('test_ukify.py'),
args: args, args: args,
env : test_env) env : test_env,
suite : 'ukify')
endif endif

View file

@ -63,7 +63,8 @@ if conf.get('ENABLE_SYSUSERS') == 1
test_sysusers_sh, test_sysusers_sh,
# https://github.com/mesonbuild/meson/issues/2681 # https://github.com/mesonbuild/meson/issues/2681
args : exe.full_path(), args : exe.full_path(),
depends : exe) depends : exe,
suite : 'sysusers')
if have_standalone_binaries if have_standalone_binaries
exe = executables_by_name.get('systemd-sysusers.standalone') exe = executables_by_name.get('systemd-sysusers.standalone')
@ -71,7 +72,8 @@ if conf.get('ENABLE_SYSUSERS') == 1
test_sysusers_sh, test_sysusers_sh,
# https://github.com/mesonbuild/meson/issues/2681 # https://github.com/mesonbuild/meson/issues/2681
args : exe.full_path(), args : exe.full_path(),
depends : exe) depends : exe,
suite : 'sysusers')
endif endif
endif endif
@ -108,7 +110,8 @@ if want_tests != 'false'
# https://github.com/mesonbuild/meson/issues/2681 # https://github.com/mesonbuild/meson/issues/2681
args : [systemctl.full_path(), args : [systemctl.full_path(),
systemd_id128.full_path()], systemd_id128.full_path()],
depends : [systemctl, systemd_id128]) depends : [systemctl, systemd_id128],
suite : 'systemctl')
endif endif
############################################################ ############################################################
@ -118,7 +121,8 @@ if want_tests != 'false' and conf.get('HAVE_SYSV_COMPAT') == 1
exe = executables_by_name.get('systemd-sysv-generator') exe = executables_by_name.get('systemd-sysv-generator')
test('sysv-generator-test', test('sysv-generator-test',
sysv_generator_test_py, sysv_generator_test_py,
depends : exe) depends : exe,
suite : 'sysv')
endif endif
############################################################ ############################################################
@ -129,7 +133,8 @@ if want_tests != 'false' and conf.get('HAVE_BLKID') == 1 and conf.get('ENABLE_BO
test('test-bootctl-json', test('test-bootctl-json',
test_bootctl_json_sh, test_bootctl_json_sh,
args : exe.full_path(), args : exe.full_path(),
depends : exe) depends : exe,
suite : 'boot')
endif endif
############################################################ ############################################################
@ -140,14 +145,16 @@ if want_tests != 'false' and conf.get('ENABLE_TMPFILES') == 1
test('test-systemd-tmpfiles', test('test-systemd-tmpfiles',
test_systemd_tmpfiles_py, test_systemd_tmpfiles_py,
args : exe.full_path(), args : exe.full_path(),
depends : exe) depends : exe,
suite : 'tmpfiles')
if have_standalone_binaries if have_standalone_binaries
exe = executables_by_name.get('systemd-tmpfiles.standalone') exe = executables_by_name.get('systemd-tmpfiles.standalone')
test('test-systemd-tmpfiles.standalone', test('test-systemd-tmpfiles.standalone',
test_systemd_tmpfiles_py, test_systemd_tmpfiles_py,
args : exe.full_path(), args : exe.full_path(),
depends : exe) depends : exe,
suite : 'tmpfiles')
endif endif
endif endif
@ -159,7 +166,8 @@ if want_tests != 'false'
test('test-compare-versions', test('test-compare-versions',
test_compare_versions_sh, test_compare_versions_sh,
args : exe.full_path(), args : exe.full_path(),
depends : exe) depends : exe,
suite : 'test')
endif endif
if install_tests if install_tests
install_data(test_compare_versions_sh, install_data(test_compare_versions_sh,
@ -178,7 +186,7 @@ if want_tests != 'false'
exe = executables_by_name.get('udevadm') exe = executables_by_name.get('udevadm')
test('udev-rules-check', test('udev-rules-check',
exe, exe,
suite : 'dist', suite : 'udev',
args : ['verify', '--resolve-names=never', all_rules]) args : ['verify', '--resolve-names=never', all_rules])
endif endif
@ -200,7 +208,8 @@ if want_tests != 'false'
# https://github.com/mesonbuild/meson/issues/2681 # https://github.com/mesonbuild/meson/issues/2681
args : exe.full_path(), args : exe.full_path(),
env : test_env, env : test_env,
depends : exe) depends : exe,
suite : 'fstab')
endif endif
if install_tests if install_tests
install_data('test-fstab-generator.sh', install_data('test-fstab-generator.sh',
@ -217,7 +226,8 @@ if want_tests != 'false'
test_network_generator_conversion_sh, test_network_generator_conversion_sh,
# https://github.com/mesonbuild/meson/issues/2681 # https://github.com/mesonbuild/meson/issues/2681
args : exe.full_path(), args : exe.full_path(),
depends : exe) depends : exe,
suite : 'network')
endif endif
if install_tests if install_tests
install_data('test-network-generator-conversion.sh', install_data('test-network-generator-conversion.sh',
@ -236,7 +246,8 @@ if want_tests != 'false'
args : ['-v'], args : ['-v'],
env : ['UDEV_RULE_RUNNER=' + exe.full_path()], env : ['UDEV_RULE_RUNNER=' + exe.full_path()],
depends : exe, depends : exe,
timeout : 180) timeout : 180,
suite : 'udev')
endif endif
if install_tests if install_tests
install_data( install_data(
@ -284,7 +295,7 @@ if want_tests != 'false' and conf.get('HAVE_DMI') == 1
source = project_source_root / p source = project_source_root / p
test('dmidecode_' + fs.stem(p), test('dmidecode_' + fs.stem(p),
udev_dmi_memory_id_test, udev_dmi_memory_id_test,
suite : 'dist', suite : 'udev',
args : [exe.full_path(), args : [exe.full_path(),
source, source,
source + '.txt'], source + '.txt'],
@ -307,5 +318,6 @@ if want_tests != 'false' and conf.get('ENABLE_KERNEL_INSTALL') == 1
test_kernel_install_sh, test_kernel_install_sh,
env : test_env, env : test_env,
args : args, args : args,
depends : deps) depends : deps,
suite : 'kernel-install')
endif endif