]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: redo grouping of tests under src/test/
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 3 Apr 2023 06:49:17 +0000 (08:49 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 4 Apr 2023 19:28:36 +0000 (21:28 +0200)
Move the tests that link to libcore into a separate subgroup.
They are special and it makes sense to keep them together. While
at it, make the list alphabetical.

Also, merge the list additions into one. No idea why it was like that.

src/test/meson.build

index d20c911e2b453430cb6a662be43c05939d7e1312..031021270030bbfa8cab183a98fd3fb14cad5f88 100644 (file)
@@ -216,25 +216,6 @@ tests += [
                 'sources' : files('test-boot-timestamps.c'),
                 'condition' : 'ENABLE_EFI',
         },
-        {
-                'sources' : files('test-bpf-devices.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-        },
-        {
-                'sources' : files('test-bpf-firewall.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-        },
-        {
-                'sources' : files('test-bpf-foreign-programs.c'),
-                'base' : test_core_base,
-        },
-        {
-                'sources' : files('test-bpf-lsm.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-        },
         {
                 'sources' : files('test-btrfs.c'),
                 'type' : 'manual',
@@ -250,27 +231,10 @@ tests += [
                 'sources' : files('test-capability.c'),
                 'dependencies' : libcap,
         },
-        {
-                'sources' : files('test-cgroup-cpu.c'),
-                'base' : test_core_base,
-        },
-        {
-                'sources' : files('test-cgroup-mask.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-        },
-        {
-                'sources' : files('test-cgroup-unit-default.c'),
-                'base' : test_core_base,
-        },
         {
                 'sources' : files('test-chase-manual.c'),
                 'type' : 'manual',
         },
-        {
-                'sources' : files('test-chown-rec.c'),
-                'base' : test_core_base,
-        },
         {
                 'sources' : files('test-compress-benchmark.c'),
                 'link_with' : [
@@ -296,27 +260,12 @@ tests += [
                 'sources' : files('test-dlopen-so.c'),
                 'dependencies' : libp11kit_cflags
         },
-        {
-                'sources' : files('test-emergency-action.c'),
-                'base' : test_core_base,
-        },
-        {
-                'sources' : files('test-engine.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-        },
         {
                 'sources' : [
                         files('test-errno-list.c'),
                         generated_gperf_headers,
                 ],
         },
-        {
-                'sources' : files('test-execute.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-                'timeout' : 360,
-        },
         {
                 'sources' : files('test-fd-util.c'),
                 'dependencies' : libseccomp,
@@ -329,11 +278,6 @@ tests += [
                 ],
                 'timeout' : 180,
         },
-        {
-                'sources' : files('test-install.c'),
-                'base' : test_core_base,
-                'type' : 'manual',
-        },
         {
                 'sources' : [
                         files('test-ip-protocol-list.c'),
@@ -344,11 +288,6 @@ tests += [
                 'sources' : files('test-ipcrm.c'),
                 'type' : 'unsafe',
         },
-        {
-                'sources' : files('test-job-type.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-        },
         {
                 'sources' : files('test-json.c'),
                 'dependencies' : libm,
@@ -365,25 +304,10 @@ tests += [
                         threads,
                 ],
         },
-        {
-                'sources' : files('test-load-fragment.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-        },
-        {
-                'sources' : files('test-loop-block.c'),
-                'dependencies' : [threads, libblkid],
-                'base' : test_core_base,
-                'parallel' : false,
-        },
         {
                 'sources' : files('test-loopback.c'),
                 'dependencies' : common_test_dependencies,
         },
-        {
-                'sources' : files('test-manager.c'),
-                'base' : test_core_base,
-        },
         {
                 'sources' : files('test-math-util.c'),
                 'dependencies' : libm,
@@ -392,26 +316,12 @@ tests += [
                 'sources' : files('test-mempress.c'),
                 'dependencies' : threads,
         },
-        {
-                'sources' : files('test-namespace.c'),
-                'dependencies' : [
-                        libblkid,
-                        threads,
-                ],
-                'base' : test_core_base,
-        },
         {
                 'sources' : files('test-netlink-manual.c'),
                 'dependencies' : libkmod,
                 'condition' : 'HAVE_KMOD',
                 'type' : 'manual',
         },
-        {
-                'sources' : files('test-ns.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-                'type' : 'manual',
-        },
         {
                 'sources' : files('test-nscd-flush.c'),
                 'condition' : 'ENABLE_NSCD',
@@ -438,12 +348,6 @@ tests += [
                 'sources' : files('test-parse-util.c'),
                 'dependencies' : libm,
         },
-        {
-                'sources' : files('test-path.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-                'timeout' : 120,
-        },
         {
                 'sources' : files('test-process-util.c'),
                 'dependencies' : threads,
@@ -462,11 +366,6 @@ tests += [
                 'condition' : 'ENABLE_BOOTLOADER',
                 'c_args' : '-I@0@'.format(efi_config_h_dir),
         },
-        {
-                'sources' : files('test-sched-prio.c'),
-                'dependencies' : common_test_dependencies,
-                'base' : test_core_base,
-        },
         {
                 'sources' : files('test-seccomp.c'),
                 'dependencies' : libseccomp,
@@ -525,39 +424,144 @@ tests += [
                 'type' : 'manual',
         },
         {
-                'sources' : files('test-unit-name.c'),
+                'sources' : files('test-utmp.c'),
+                'condition' : 'ENABLE_UTMP',
+        },
+        {
+                'sources' : files('test-varlink.c'),
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('test-watchdog.c'),
+                'type' : 'unsafe',
+        },
+
+
+        # Tests that link to libcore, i.e. tests for pid1 code.
+        {
+                'sources' : files('test-bpf-devices.c'),
                 'dependencies' : common_test_dependencies,
                 'base' : test_core_base,
         },
         {
-                'sources' : files('test-unit-serialize.c'),
+                'sources' : files('test-bpf-firewall.c'),
                 'dependencies' : common_test_dependencies,
                 'base' : test_core_base,
         },
         {
-                'sources' : files('test-utmp.c'),
-                'condition' : 'ENABLE_UTMP',
+                'sources' : files('test-bpf-foreign-programs.c'),
+                'base' : test_core_base,
         },
         {
-                'sources' : files('test-varlink.c'),
-                'dependencies' : threads,
+                'sources' : files('test-bpf-lsm.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
         },
         {
-                'sources' : files('test-watch-pid.c'),
+                'sources' : files('test-cgroup-cpu.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-cgroup-mask.c'),
                 'dependencies' : common_test_dependencies,
                 'base' : test_core_base,
         },
         {
-                'sources' : files('test-watchdog.c'),
-                'type' : 'unsafe',
+                'sources' : files('test-cgroup-unit-default.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-chown-rec.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-emergency-action.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-engine.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-execute.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+                'timeout' : 360,
+        },
+        {
+                'sources' : files('test-install.c'),
+                'base' : test_core_base,
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-job-type.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-load-fragment.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-loop-block.c'),
+                'dependencies' : [threads, libblkid],
+                'base' : test_core_base,
+                'parallel' : false,
+        },
+        {
+                'sources' : files('test-manager.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-namespace.c'),
+                'dependencies' : [
+                        libblkid,
+                        threads,
+                ],
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-ns.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-path.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+                'timeout' : 120,
+        },
+        {
+                'sources' : files('test-sched-prio.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-socket-bind.c'),
+                'dependencies' : libdl,
+                'condition' : 'BPF_FRAMEWORK',
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-unit-name.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-unit-serialize.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-watch-pid.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
         },
-]
-
-############################################################
-
-# define some tests here, because the link_with deps were not defined earlier
 
-tests += [
+        # Tests from other directories that have link_with deps that were not defined earlier
         {
                 'sources' : files('../libsystemd/sd-bus/test-bus-error.c'),
                 'link_with' : [
@@ -575,10 +579,4 @@ tests += [
                 'link_with' : libudev,
                 'dependencies' : threads,
         },
-        {
-                'sources' : files('test-socket-bind.c'),
-                'dependencies' : libdl,
-                'condition' : 'BPF_FRAMEWORK',
-                'base' : test_core_base,
-        },
 ]