]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Use meson test suite feature
authorJan Janssen <medhefgo@web.de>
Mon, 2 May 2022 09:12:34 +0000 (11:12 +0200)
committerJan Janssen <medhefgo@web.de>
Wed, 4 May 2022 14:11:34 +0000 (16:11 +0200)
This makes it easier to only test a subset of tests without having
to specify them all on the command line:
    meson test -C build --suite headers

hwdb.d/meson.build
man/meson.build
meson.build
src/systemd/meson.build
test/meson.build

index b4c519c8fd3141bced87888125494ebda0d6b69e..90b71916b7df5b96cd473b0d94108bd68c32273d 100644 (file)
@@ -61,6 +61,7 @@ if conf.get('ENABLE_HWDB') == 1
                 parse_hwdb_py = find_program('parse_hwdb.py')
                 test('parse-hwdb',
                      parse_hwdb_py,
+                     suite : 'dist-check',
                      args : [hwdb_files_test,
                              auto_suspend_rules],
                      timeout : 90)
index d9c706b4abab403fd4d9566d2c6f82ae2dea68be..b7725ce5f0ecd3344a47d444280fd7d063ddd5c5 100644 (file)
@@ -226,6 +226,7 @@ update_dbus_docs = custom_target(
 if conf.get('BUILD_MODE_DEVELOPER') == 1
         test('dbus-docs-fresh',
              update_dbus_docs_py,
+             suite : 'dist-check',
              args : ['--build-dir', project_build_root, '--test', dbus_docs],
              depends : dbus_programs)
 endif
index ef532e421f6269aa9ba53074f6fe0c23fd8e8eb9..a3f9e3b92d47b7aa4f41621c2674b843d5d06c78 100644 (file)
@@ -3518,6 +3518,7 @@ if conf.get('ENABLE_HWDB') == 1
         if want_tests != 'false'
                 test('hwdb-test',
                      hwdb_test_sh,
+                     suite : 'dist-check',
                      args : [systemd_hwdb.full_path()],
                      timeout : 90)
         endif
@@ -3878,6 +3879,7 @@ foreach tuple : fuzzers
                         if b == name
                                 test('@0@_@1@'.format(b, c),
                                      exe,
+                                     suite : 'fuzzers',
                                      args : [project_source_root / p])
                         endif
                 endforeach
@@ -3940,6 +3942,7 @@ jekyll = find_program('jekyll', required : false)
 if get_option('mode') == 'developer' and want_tests != 'false' and jekyll.found()
         test('github-pages',
              jekyll,
+             suite : 'dist-check',
              args : ['build',
                      '--source', project_source_root / 'docs',
                      '--destination', project_build_root / '_site'])
@@ -3955,11 +3958,13 @@ foreach exec : public_programs
         if want_tests != 'false'
                 test('check-help-' + name,
                      check_help,
+                     suite : 'dist-check',
                      args : exec.full_path(),
                      depends: exec)
 
                 test('check-version-' + name,
                      check_version,
+                     suite : 'dist-check',
                      args : [exec.full_path(),
                              meson.project_version()],
                      depends: exec)
@@ -3973,6 +3978,7 @@ check_directives_sh = find_program('tools/check-directives.sh')
 if want_tests != 'false'
         test('check-directives',
              check_directives_sh,
+             suite : 'dist-check',
              args : [project_source_root, project_build_root])
 endif
 
@@ -4012,6 +4018,7 @@ foreach tuple : sanitizers
                         if fuzz_tests
                                 test('@0@_@1@_@2@'.format(b, c, sanitizer),
                                      env,
+                                     suite : 'fuzz+san',
                                      env : ['UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1'],
                                      timeout : 60,
                                      args : [exe.full_path(),
index ea73f92af5701bb480ae6a887bddac47dfff9de0..0cacecc2d528e28f34d7c633c198cd635bd7576f 100644 (file)
@@ -79,6 +79,7 @@ foreach header : _systemd_headers + _not_installed_headers + [libudev_h_path]
                 std_name = opt.length() == 2 ? '_'.join(opt[1].split(':')) : ''
                 test('cc-' + header.split('/')[-1] + '_' + opt[0] + std_name,
                      env,
+                     suite : 'headers',
                      args : [cc.cmd_array(),
                              '-c',
                              '-x', opt,
index 34f78d5c62ec0a56cd9c6e0f400a8f826922fb0f..f2e4ee096736bd8acac438db4f90a419b0078f75 100644 (file)
@@ -112,6 +112,7 @@ rule_syntax_check_py = find_program('rule-syntax-check.py')
 if want_tests != 'false'
         test('rule-syntax-check',
              rule_syntax_check_py,
+             suite : 'dist-check',
              args : all_rules)
 endif
 
@@ -162,6 +163,7 @@ if rpm.found() and rpmspec.found()
         if want_tests != 'false'
                 test('test-rpm-macros',
                      test_rpm_macros,
+                     suite : 'dist-check',
                      args : [project_build_root])
         endif
 else
@@ -191,6 +193,7 @@ if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family())
 
                 test(name,
                      udev_dmi_memory_id_test,
+                     suite : 'dist-check',
                      args : [udev_prog_paths['dmi_memory_id'].full_path(),
                              source,
                              source + '.txt'],