From dc4a00555a95af155c9a7edf21d6cb2cb1b355a5 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 27 Jun 2023 01:28:32 +0900 Subject: [PATCH] meson: set suite for all tests, and adjust suite for some tests --- meson.build | 6 ++++-- src/ukify/test/meson.build | 3 ++- test/meson.build | 40 +++++++++++++++++++++++++------------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/meson.build b/meson.build index cf217c1bf0..9d10d76d9f 100644 --- a/meson.build +++ b/meson.build @@ -2712,7 +2712,8 @@ foreach dict : modules test_dlopen, # path to dlopen must include a slash args : lib.full_path(), - depends : lib) + depends : lib, + suite : is_nss ? 'nss' : 'pam') endif endforeach @@ -2888,7 +2889,8 @@ if git.found() test('check-includes', files('tools/check-includes.py'), 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 diff --git a/src/ukify/test/meson.build b/src/ukify/test/meson.build index e78e76c673..5870ccc06c 100644 --- a/src/ukify/test/meson.build +++ b/src/ukify/test/meson.build @@ -15,5 +15,6 @@ if want_ukify and want_tests != 'false' test('test-ukify', files('test_ukify.py'), args: args, - env : test_env) + env : test_env, + suite : 'ukify') endif diff --git a/test/meson.build b/test/meson.build index 59d9a63a11..97ec7ee5c5 100644 --- a/test/meson.build +++ b/test/meson.build @@ -63,7 +63,8 @@ if conf.get('ENABLE_SYSUSERS') == 1 test_sysusers_sh, # https://github.com/mesonbuild/meson/issues/2681 args : exe.full_path(), - depends : exe) + depends : exe, + suite : 'sysusers') if have_standalone_binaries exe = executables_by_name.get('systemd-sysusers.standalone') @@ -71,7 +72,8 @@ if conf.get('ENABLE_SYSUSERS') == 1 test_sysusers_sh, # https://github.com/mesonbuild/meson/issues/2681 args : exe.full_path(), - depends : exe) + depends : exe, + suite : 'sysusers') endif endif @@ -108,7 +110,8 @@ if want_tests != 'false' # https://github.com/mesonbuild/meson/issues/2681 args : [systemctl.full_path(), systemd_id128.full_path()], - depends : [systemctl, systemd_id128]) + depends : [systemctl, systemd_id128], + suite : 'systemctl') endif ############################################################ @@ -118,7 +121,8 @@ if want_tests != 'false' and conf.get('HAVE_SYSV_COMPAT') == 1 exe = executables_by_name.get('systemd-sysv-generator') test('sysv-generator-test', sysv_generator_test_py, - depends : exe) + depends : exe, + suite : 'sysv') 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_bootctl_json_sh, args : exe.full_path(), - depends : exe) + depends : exe, + suite : 'boot') endif ############################################################ @@ -140,14 +145,16 @@ if want_tests != 'false' and conf.get('ENABLE_TMPFILES') == 1 test('test-systemd-tmpfiles', test_systemd_tmpfiles_py, args : exe.full_path(), - depends : exe) + depends : exe, + suite : 'tmpfiles') if have_standalone_binaries exe = executables_by_name.get('systemd-tmpfiles.standalone') test('test-systemd-tmpfiles.standalone', test_systemd_tmpfiles_py, args : exe.full_path(), - depends : exe) + depends : exe, + suite : 'tmpfiles') endif endif @@ -159,7 +166,8 @@ if want_tests != 'false' test('test-compare-versions', test_compare_versions_sh, args : exe.full_path(), - depends : exe) + depends : exe, + suite : 'test') endif if install_tests install_data(test_compare_versions_sh, @@ -178,7 +186,7 @@ if want_tests != 'false' exe = executables_by_name.get('udevadm') test('udev-rules-check', exe, - suite : 'dist', + suite : 'udev', args : ['verify', '--resolve-names=never', all_rules]) endif @@ -200,7 +208,8 @@ if want_tests != 'false' # https://github.com/mesonbuild/meson/issues/2681 args : exe.full_path(), env : test_env, - depends : exe) + depends : exe, + suite : 'fstab') endif if install_tests install_data('test-fstab-generator.sh', @@ -217,7 +226,8 @@ if want_tests != 'false' test_network_generator_conversion_sh, # https://github.com/mesonbuild/meson/issues/2681 args : exe.full_path(), - depends : exe) + depends : exe, + suite : 'network') endif if install_tests install_data('test-network-generator-conversion.sh', @@ -236,7 +246,8 @@ if want_tests != 'false' args : ['-v'], env : ['UDEV_RULE_RUNNER=' + exe.full_path()], depends : exe, - timeout : 180) + timeout : 180, + suite : 'udev') endif if install_tests install_data( @@ -284,7 +295,7 @@ if want_tests != 'false' and conf.get('HAVE_DMI') == 1 source = project_source_root / p test('dmidecode_' + fs.stem(p), udev_dmi_memory_id_test, - suite : 'dist', + suite : 'udev', args : [exe.full_path(), source, source + '.txt'], @@ -307,5 +318,6 @@ if want_tests != 'false' and conf.get('ENABLE_KERNEL_INSTALL') == 1 test_kernel_install_sh, env : test_env, args : args, - depends : deps) + depends : deps, + suite : 'kernel-install') endif