]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Rework integration test definitions
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 11 May 2024 13:55:54 +0000 (15:55 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 14 May 2024 10:43:28 +0000 (12:43 +0200)
Let's make this behave more like all the rest of the meson stuff.
This also is the first step to making it a bit more flexible so we
can define integration tests in different ways as will be seen in
the next commits.

58 files changed:
test/TEST-01-BASIC/meson.build [new file with mode: 0644]
test/TEST-02-UNITTESTS/meson.build
test/TEST-03-JOBS/meson.build [new file with mode: 0644]
test/TEST-04-JOURNAL/meson.build
test/TEST-05-RLIMITS/meson.build [new file with mode: 0644]
test/TEST-06-SELINUX/meson.build
test/TEST-07-PID1/meson.build [new file with mode: 0644]
test/TEST-09-REBOOT/meson.build
test/TEST-13-NSPAWN/meson.build [new file with mode: 0644]
test/TEST-15-DROPIN/meson.build [new file with mode: 0644]
test/TEST-16-EXTEND-TIMEOUT/meson.build [new file with mode: 0644]
test/TEST-17-UDEV/meson.build [new file with mode: 0644]
test/TEST-18-FAILUREACTION/meson.build
test/TEST-19-CGROUP/meson.build [new file with mode: 0644]
test/TEST-21-DFUZZER/meson.build
test/TEST-22-TMPFILES/meson.build [new file with mode: 0644]
test/TEST-23-UNIT-FILE/meson.build [new file with mode: 0644]
test/TEST-25-IMPORT/meson.build [new file with mode: 0644]
test/TEST-26-SYSTEMCTL/meson.build [new file with mode: 0644]
test/TEST-29-PORTABLE/meson.build [new file with mode: 0644]
test/TEST-30-ONCLOCKCHANGE/meson.build [new file with mode: 0644]
test/TEST-31-DEVICE-ENUMERATION/meson.build [new file with mode: 0644]
test/TEST-32-OOMPOLICY/meson.build [new file with mode: 0644]
test/TEST-34-DYNAMICUSERMIGRATE/meson.build [new file with mode: 0644]
test/TEST-35-LOGIN/meson.build [new file with mode: 0644]
test/TEST-36-NUMAPOLICY/meson.build [new file with mode: 0644]
test/TEST-38-FREEZER/meson.build [new file with mode: 0644]
test/TEST-43-PRIVATEUSER-UNPRIV/meson.build [new file with mode: 0644]
test/TEST-44-LOG-NAMESPACE/meson.build [new file with mode: 0644]
test/TEST-45-TIMEDATE/meson.build [new file with mode: 0644]
test/TEST-46-HOMED/meson.build [new file with mode: 0644]
test/TEST-50-DISSECT/meson.build [new file with mode: 0644]
test/TEST-52-HONORFIRSTSHUTDOWN/meson.build [new file with mode: 0644]
test/TEST-53-ISSUE-16347/meson.build
test/TEST-55-OOMD/meson.build
test/TEST-58-REPART/meson.build [new file with mode: 0644]
test/TEST-59-RELOADING-RESTART/meson.build [new file with mode: 0644]
test/TEST-60-MOUNT-RATELIMIT/meson.build [new file with mode: 0644]
test/TEST-62-RESTRICT-IFACES/meson.build [new file with mode: 0644]
test/TEST-63-PATH/meson.build [new file with mode: 0644]
test/TEST-65-ANALYZE/meson.build [new file with mode: 0644]
test/TEST-66-DEVICE-ISOLATION/meson.build [new file with mode: 0644]
test/TEST-67-INTEGRITY/meson.build [new file with mode: 0644]
test/TEST-68-PROPAGATE-EXIT-STATUS/meson.build [new file with mode: 0644]
test/TEST-70-TPM2/meson.build [new file with mode: 0644]
test/TEST-71-HOSTNAME/meson.build [new file with mode: 0644]
test/TEST-72-SYSUPDATE/meson.build [new file with mode: 0644]
test/TEST-73-LOCALE/meson.build [new file with mode: 0644]
test/TEST-74-AUX-UTILS/meson.build
test/TEST-75-RESOLVED/meson.build [new file with mode: 0644]
test/TEST-76-SYSCTL/meson.build [new file with mode: 0644]
test/TEST-78-SIGQUEUE/meson.build [new file with mode: 0644]
test/TEST-79-MEMPRESS/meson.build [new file with mode: 0644]
test/TEST-80-NOTIFYACCESS/meson.build [new file with mode: 0644]
test/TEST-81-GENERATORS/meson.build [new file with mode: 0644]
test/TEST-83-BTRFS/meson.build [new file with mode: 0644]
test/TEST-84-STORAGETM/meson.build [new file with mode: 0644]
test/meson.build

diff --git a/test/TEST-01-BASIC/meson.build b/test/TEST-01-BASIC/meson.build
new file mode 100644 (file)
index 0000000..257dadd
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : 'TEST-01-BASIC',
+        },
+]
index 5c3c0408583a83bfb477b9d88a8be8266547c291..89a3edf2ad283ae60278b0fc80e562f349a73482 100644 (file)
@@ -1,15 +1,17 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-test_params += {
-        'mkosi_args': test_params['mkosi_args'] + [
-                '--kernel-command-line-extra=' + ' '.join([
-                        '''
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'mkosi_args' : integration_test_template['mkosi_args'] + [
+                        '''--kernel-command-line-extra=
+
 frobnicate!
 
 systemd.setenv=TEST_CMDLINE_NEWLINE=foo
 systemd.setenv=TEST_CMDLINE_NEWLINE=bar
 
 ''',
-                ]),
-        ],
-}
+                ],
+        },
+]
diff --git a/test/TEST-03-JOBS/meson.build b/test/TEST-03-JOBS/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
index 7f5cc704c9da8bbc73326a321ae9c8f920b91624..184f70ab720bbfab14df975559b48a53f762949f 100644 (file)
@@ -1,5 +1,10 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-test_params += {
-        'storage': 'persistent',
-}
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'storage' : 'persistent',
+        },
+]
diff --git a/test/TEST-05-RLIMITS/meson.build b/test/TEST-05-RLIMITS/meson.build
new file mode 100644 (file)
index 0000000..d8198fd
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : 'TEST-05-RLIMITS',
+        },
+]
index a62d144048e054440121d29b2f84ec1fb096f9be..408e41ff287b1bf1731a425dba1f565c6b8c5957 100644 (file)
@@ -1,7 +1,12 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-test_params += {
-        'mkosi_args' : ['--kernel-command-line-extra=apparmor=0 selinux=1 enforcing=0 lsm=selinux systemd.wants=autorelabel.service systemd.wants=firstboot-autorelabel.service'],
-        # FIXME; Figure out why reboot sometimes hangs with 'linux' firmware.
-        'firmware' : 'uefi',
-}
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'mkosi_args' : integration_test_template['mkosi_args'] + [
+                        '--kernel-command-line-extra=apparmor=0 selinux=1 enforcing=0 lsm=selinux systemd.wants=autorelabel.service systemd.wants=firstboot-autorelabel.service'
+                ],
+                # FIXME; Figure out why reboot sometimes hangs with 'linux' firmware.
+                'firmware' : 'uefi',
+        },
+]
diff --git a/test/TEST-07-PID1/meson.build b/test/TEST-07-PID1/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
index a511a829af22cb66ccf6daa17351b0d75985f50d..c4b41bc97b5df20dfde8ff0308572ce70a2e0be5 100644 (file)
@@ -1,7 +1,10 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-test_params += {
-        'storage': 'persistent',
-        # FIXME; Figure out why reboot sometimes hangs with 'linux' firmware.
-        'firmware' : 'uefi',
-}
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'storage' : 'persistent',
+                # FIXME; Figure out why reboot sometimes hangs with 'linux' firmware.
+                'firmware' : 'uefi',
+        },
+]
diff --git a/test/TEST-13-NSPAWN/meson.build b/test/TEST-13-NSPAWN/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-15-DROPIN/meson.build b/test/TEST-15-DROPIN/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-16-EXTEND-TIMEOUT/meson.build b/test/TEST-16-EXTEND-TIMEOUT/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-17-UDEV/meson.build b/test/TEST-17-UDEV/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
index e1bca2d7a83fee3c2de6741d6629ad6662db69ec..5edfbcad1fb179bb81f37585f1eeb943347c0084 100644 (file)
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-test_params += {
-        # FIXME; Figure out why reboot sometimes hangs with 'linux' firmware.
-        'firmware' : 'uefi',
-}
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                # FIXME; Figure out why reboot sometimes hangs with 'linux' firmware.
+                'firmware' : 'uefi',
+        },
+]
diff --git a/test/TEST-19-CGROUP/meson.build b/test/TEST-19-CGROUP/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
index 5a27fb2f3f3ffb6e403ed9dc8f733732abe786de..aa6652910c7a14a2d5f08d8f9c8c29fe0e6e36e1 100644 (file)
@@ -1,7 +1,10 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-test_params +=  {
-        'timeout' : 3600,
-        'priority' : -50,
-        'slow' : true,
-}
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'timeout' : 3600,
+                'priority' : -50,
+                'slow' : true,
+        },
+]
diff --git a/test/TEST-22-TMPFILES/meson.build b/test/TEST-22-TMPFILES/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-23-UNIT-FILE/meson.build b/test/TEST-23-UNIT-FILE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-25-IMPORT/meson.build b/test/TEST-25-IMPORT/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-26-SYSTEMCTL/meson.build b/test/TEST-26-SYSTEMCTL/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-29-PORTABLE/meson.build b/test/TEST-29-PORTABLE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-30-ONCLOCKCHANGE/meson.build b/test/TEST-30-ONCLOCKCHANGE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-31-DEVICE-ENUMERATION/meson.build b/test/TEST-31-DEVICE-ENUMERATION/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-32-OOMPOLICY/meson.build b/test/TEST-32-OOMPOLICY/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-34-DYNAMICUSERMIGRATE/meson.build b/test/TEST-34-DYNAMICUSERMIGRATE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-35-LOGIN/meson.build b/test/TEST-35-LOGIN/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-36-NUMAPOLICY/meson.build b/test/TEST-36-NUMAPOLICY/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-38-FREEZER/meson.build b/test/TEST-38-FREEZER/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-43-PRIVATEUSER-UNPRIV/meson.build b/test/TEST-43-PRIVATEUSER-UNPRIV/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-44-LOG-NAMESPACE/meson.build b/test/TEST-44-LOG-NAMESPACE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-45-TIMEDATE/meson.build b/test/TEST-45-TIMEDATE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-46-HOMED/meson.build b/test/TEST-46-HOMED/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-50-DISSECT/meson.build b/test/TEST-50-DISSECT/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-52-HONORFIRSTSHUTDOWN/meson.build b/test/TEST-52-HONORFIRSTSHUTDOWN/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
index 0b7644f4ad2c4f5db27c38949ec3a6b2eedb634e..91b6f4227479519796638751d36ef25a296b6c63 100644 (file)
@@ -1,7 +1,10 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-test_params += {
-        'mkosi_args' : test_params['mkosi_args'] + [
-                '--configure-script', meson.current_source_dir() / 'mkosi.configure',
-        ],
-}
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'mkosi_args' : integration_test_template['mkosi_args'] + [
+                        '--configure-script', meson.current_source_dir() / 'mkosi.configure',
+                ],
+        },
+]
index 86a0d8f957234b19e79d19c456b34eba26de9b20..132a6b30808530453db69beb1c2dad2d39bcba6d 100644 (file)
@@ -1,7 +1,10 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-test_params += {
-        'mkosi_args' : test_params['mkosi_args'] + [
-                '--credential=@0@'.format(meson.current_source_dir() / 'systemd.unit-dropin.init.scope')
-        ]
-}
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'mkosi_args' : integration_test_template['mkosi_args'] + [
+                        '--credential=@0@'.format(meson.current_source_dir() / 'systemd.unit-dropin.init.scope')
+                ]
+        },
+]
diff --git a/test/TEST-58-REPART/meson.build b/test/TEST-58-REPART/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-59-RELOADING-RESTART/meson.build b/test/TEST-59-RELOADING-RESTART/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-60-MOUNT-RATELIMIT/meson.build b/test/TEST-60-MOUNT-RATELIMIT/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-62-RESTRICT-IFACES/meson.build b/test/TEST-62-RESTRICT-IFACES/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-63-PATH/meson.build b/test/TEST-63-PATH/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-65-ANALYZE/meson.build b/test/TEST-65-ANALYZE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-66-DEVICE-ISOLATION/meson.build b/test/TEST-66-DEVICE-ISOLATION/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-67-INTEGRITY/meson.build b/test/TEST-67-INTEGRITY/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-68-PROPAGATE-EXIT-STATUS/meson.build b/test/TEST-68-PROPAGATE-EXIT-STATUS/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-70-TPM2/meson.build b/test/TEST-70-TPM2/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-71-HOSTNAME/meson.build b/test/TEST-71-HOSTNAME/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-72-SYSUPDATE/meson.build b/test/TEST-72-SYSUPDATE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-73-LOCALE/meson.build b/test/TEST-73-LOCALE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
index 7f5cc704c9da8bbc73326a321ae9c8f920b91624..43a733ee64e783a21faa0fdf4bf70408f62176de 100644 (file)
@@ -1,5 +1,8 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-test_params += {
-        'storage': 'persistent',
-}
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'storage': 'persistent',
+        },
+]
diff --git a/test/TEST-75-RESOLVED/meson.build b/test/TEST-75-RESOLVED/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-76-SYSCTL/meson.build b/test/TEST-76-SYSCTL/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-78-SIGQUEUE/meson.build b/test/TEST-78-SIGQUEUE/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-79-MEMPRESS/meson.build b/test/TEST-79-MEMPRESS/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-80-NOTIFYACCESS/meson.build b/test/TEST-80-NOTIFYACCESS/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-81-GENERATORS/meson.build b/test/TEST-81-GENERATORS/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-83-BTRFS/meson.build b/test/TEST-83-BTRFS/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
diff --git a/test/TEST-84-STORAGETM/meson.build b/test/TEST-84-STORAGETM/meson.build
new file mode 100644 (file)
index 0000000..8dec5f3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+        },
+]
index 30a0461f0d9876a36e06eaaf8011af5a3d611744..37c6a671ad8285c173348e31588f6aa06d492925 100644 (file)
@@ -344,102 +344,101 @@ endif
 ############################################################
 
 integration_test_wrapper = find_program('integration-test-wrapper.py')
-integration_tests = {
-        '01': 'TEST-01-BASIC',
-        '02': 'TEST-02-UNITTESTS',
-        '03': 'TEST-03-JOBS',
-        '04': 'TEST-04-JOURNAL',
-        '05': 'TEST-05-RLIMITS',
-        '06': 'TEST-06-SELINUX',
-        '07': 'TEST-07-PID1',
-        # '08': 'TEST-08-INITRD',
-        '09': 'TEST-09-REBOOT',
-        '13': 'TEST-13-NSPAWN',
-        '15': 'TEST-15-DROPIN',
-        '16': 'TEST-16-EXTEND-TIMEOUT',
-        '17': 'TEST-17-UDEV',
-        '18': 'TEST-18-FAILUREACTION',
-        '19': 'TEST-19-CGROUP',
-        '21': 'TEST-21-DFUZZER',
-        '22': 'TEST-22-TMPFILES',
-        '23': 'TEST-23-UNIT-FILE',
-        # '24': 'TEST-24-CRYPTSETUP',
-        '25': 'TEST-25-IMPORT',
-        '26': 'TEST-26-SYSTEMCTL',
-        '29': 'TEST-29-PORTABLE',
-        '30': 'TEST-30-ONCLOCKCHANGE',
-        '31': 'TEST-31-DEVICE-ENUMERATION',
-        '32': 'TEST-32-OOMPOLICY',
-        '34': 'TEST-34-DYNAMICUSERMIGRATE',
-        '35': 'TEST-35-LOGIN',
-        '36': 'TEST-36-NUMAPOLICY',
-        '38': 'TEST-38-FREEZER',
-        '43': 'TEST-43-PRIVATEUSER-UNPRIV',
-        '44': 'TEST-44-LOG-NAMESPACE',
-        '45': 'TEST-45-TIMEDATE',
-        '46': 'TEST-46-HOMED',
-        '50': 'TEST-50-DISSECT',
-        '52': 'TEST-52-HONORFIRSTSHUTDOWN',
-        '53': 'TEST-53-ISSUE-16347',
-        # '54': 'TEST-54-CREDS',
-        '55': 'TEST-55-OOMD',
-        '58': 'TEST-58-REPART',
-        '59': 'TEST-59-RELOADING-RESTART',
-        '60': 'TEST-60-MOUNT-RATELIMIT',
-        '62': 'TEST-62-RESTRICT-IFACES',
-        '63': 'TEST-63-PATH',
-        # '64': 'TEST-64-UDEV-STORAGE',
-        '65': 'TEST-65-ANALYZE',
-        '66': 'TEST-66-DEVICE-ISOLATION',
-        '67': 'TEST-67-INTEGRITY',
-        '68': 'TEST-68-PROPAGATE-EXIT-STATUS',
-        # '69': 'TEST-69-SHUTDOWN',
-        '70': 'TEST-70-TPM2',
-        '71': 'TEST-71-HOSTNAME',
-        '72': 'TEST-72-SYSUPDATE',
-        '73': 'TEST-73-LOCALE',
-        '74': 'TEST-74-AUX-UTILS',
-        '75': 'TEST-75-RESOLVED',
-        '76': 'TEST-76-SYSCTL',
-        '78': 'TEST-78-SIGQUEUE',
-        '79': 'TEST-79-MEMPRESS',
-        '80': 'TEST-80-NOTIFYACCESS',
-        '81': 'TEST-81-GENERATORS',
-        # '82': 'TEST-82-SOFTREBOOT',
-        '83': 'TEST-83-BTRFS',
-        '84': 'TEST-84-STORAGETM',
+integration_tests = []
+integration_test_template = {
+        'mkosi_args' : [],
+        'timeout' : 1800,
+        'storage' : 'volatile',
+        'priority' : 0,
+        'firmware' : 'linux',
+        'slow' : false,
 }
-foreach test_number, dirname : integration_tests
-        test_params = {
-                'mkosi_args' : [],
-                'timeout' : 1800,
-                'storage' : 'volatile',
-                'priority' : 0,
-                'firmware' : 'linux',
-                'slow' : false,
-        }
-
-        # TODO: This fs.exists call isn't included in rebuild logic
-        # so if you add a new meson.build in a subdir
-        # you need to touch another build file to get it to reparse.
-        if fs.exists(dirname / 'meson.build')
-                subdir(dirname)
-        endif
 
-        args = [
+foreach dirname : [
+        'TEST-01-BASIC',
+        'TEST-02-UNITTESTS',
+        'TEST-03-JOBS',
+        'TEST-04-JOURNAL',
+        'TEST-05-RLIMITS',
+        'TEST-06-SELINUX',
+        'TEST-07-PID1',
+        # 'TEST-08-INITRD',
+        'TEST-09-REBOOT',
+        'TEST-13-NSPAWN',
+        'TEST-15-DROPIN',
+        'TEST-16-EXTEND-TIMEOUT',
+        'TEST-17-UDEV',
+        'TEST-18-FAILUREACTION',
+        'TEST-19-CGROUP',
+        'TEST-21-DFUZZER',
+        'TEST-22-TMPFILES',
+        'TEST-23-UNIT-FILE',
+        # 'TEST-24-CRYPTSETUP',
+        'TEST-25-IMPORT',
+        'TEST-26-SYSTEMCTL',
+        'TEST-29-PORTABLE',
+        'TEST-30-ONCLOCKCHANGE',
+        'TEST-31-DEVICE-ENUMERATION',
+        'TEST-32-OOMPOLICY',
+        'TEST-34-DYNAMICUSERMIGRATE',
+        'TEST-35-LOGIN',
+        'TEST-36-NUMAPOLICY',
+        'TEST-38-FREEZER',
+        'TEST-43-PRIVATEUSER-UNPRIV',
+        'TEST-44-LOG-NAMESPACE',
+        'TEST-45-TIMEDATE',
+        'TEST-46-HOMED',
+        'TEST-50-DISSECT',
+        'TEST-52-HONORFIRSTSHUTDOWN',
+        'TEST-53-ISSUE-16347',
+        # 'TEST-54-CREDS',
+        'TEST-55-OOMD',
+        'TEST-58-REPART',
+        'TEST-59-RELOADING-RESTART',
+        'TEST-60-MOUNT-RATELIMIT',
+        'TEST-62-RESTRICT-IFACES',
+        'TEST-63-PATH',
+        # 'TEST-64-UDEV-STORAGE',
+        'TEST-65-ANALYZE',
+        'TEST-66-DEVICE-ISOLATION',
+        'TEST-67-INTEGRITY',
+        'TEST-68-PROPAGATE-EXIT-STATUS',
+        # 'TEST-69-SHUTDOWN',
+        'TEST-70-TPM2',
+        'TEST-71-HOSTNAME',
+        'TEST-72-SYSUPDATE',
+        'TEST-73-LOCALE',
+        'TEST-74-AUX-UTILS',
+        'TEST-75-RESOLVED',
+        'TEST-76-SYSCTL',
+        'TEST-78-SIGQUEUE',
+        'TEST-79-MEMPRESS',
+        'TEST-80-NOTIFYACCESS',
+        'TEST-81-GENERATORS',
+        # 'TEST-82-SOFTREBOOT',
+        'TEST-83-BTRFS',
+        'TEST-84-STORAGETM',
+]
+        subdir(dirname)
+endforeach
+
+foreach integration_test : integration_tests
+        integration_test_number = integration_test['name'].split('-')[1]
+
+        integration_test_args = [
                 '--meson-source-dir', meson.project_source_root(),
                 '--meson-build-dir', meson.project_build_root(),
-                '--test-name', dirname,
-                '--test-number', test_number,
-                '--storage', test_params['storage'],
-                '--firmware', test_params['firmware'],
+                '--test-name', integration_test['name'],
+                '--test-number', integration_test_number,
+                '--storage', integration_test['storage'],
+                '--firmware', integration_test['firmware'],
         ]
 
-        if test_params['slow']
-                args += ['--slow']
+        if integration_test['slow']
+                integration_test_args += ['--slow']
         endif
 
-        args += ['--'] + test_params['mkosi_args']
+        integration_test_args += ['--'] + integration_test['mkosi_args']
 
         integration_test_env = {}
 
@@ -451,14 +450,16 @@ foreach test_number, dirname : integration_tests
                 integration_test_env += {'SYSTEMD_SLOW_TESTS': '1'}
         endif
 
-        # We don't explicitly depend on the "mkosi" target because that means the image is rebuilt
-        # on every "ninja -C build". Instead, the mkosi target has to be rebuilt manually before
-        # running the integration tests with mkosi.
-        test(dirname,
-             integration_test_wrapper,
-             env : integration_test_env,
-             args : args,
-             timeout : test_params['timeout'],
-             priority : test_params['priority'],
-             suite : 'integration-tests')
+        # We don't explicitly depend on the "mkosi" target because that means the image is rebuilt on every
+        # "ninja -C build". Instead, the mkosi target has to be rebuilt manually before running the
+        # integration tests with mkosi.
+        test(
+                integration_test['name'],
+                integration_test_wrapper,
+                env : integration_test_env,
+                args : integration_test_args,
+                timeout : integration_test['timeout'],
+                priority : integration_test['priority'],
+                suite : 'integration-tests',
+        )
 endforeach