]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Disable tests via 'enabled' field
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 11 May 2024 18:22:10 +0000 (20:22 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 14 May 2024 10:43:28 +0000 (12:43 +0200)
This allows doing other stuff with the test without actually defining
the test, such as generating a service unit automatically.

test/TEST-08-INITRD/meson.build [new file with mode: 0644]
test/TEST-24-CRYPTSETUP/meson.build [new file with mode: 0644]
test/TEST-54-CREDS/meson.build [new file with mode: 0644]
test/TEST-64-UDEV-STORAGE/meson.build [new file with mode: 0644]
test/TEST-69-SHUTDOWN/meson.build [new file with mode: 0644]
test/TEST-82-SOFTREBOOT/meson.build [new file with mode: 0644]
test/meson.build

diff --git a/test/TEST-08-INITRD/meson.build b/test/TEST-08-INITRD/meson.build
new file mode 100644 (file)
index 0000000..d53dbe5
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'enabled' : false,
+        },
+]
diff --git a/test/TEST-24-CRYPTSETUP/meson.build b/test/TEST-24-CRYPTSETUP/meson.build
new file mode 100644 (file)
index 0000000..d53dbe5
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'enabled' : false,
+        },
+]
diff --git a/test/TEST-54-CREDS/meson.build b/test/TEST-54-CREDS/meson.build
new file mode 100644 (file)
index 0000000..d53dbe5
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'enabled' : false,
+        },
+]
diff --git a/test/TEST-64-UDEV-STORAGE/meson.build b/test/TEST-64-UDEV-STORAGE/meson.build
new file mode 100644 (file)
index 0000000..d53dbe5
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'enabled' : false,
+        },
+]
diff --git a/test/TEST-69-SHUTDOWN/meson.build b/test/TEST-69-SHUTDOWN/meson.build
new file mode 100644 (file)
index 0000000..d53dbe5
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'enabled' : false,
+        },
+]
diff --git a/test/TEST-82-SOFTREBOOT/meson.build b/test/TEST-82-SOFTREBOOT/meson.build
new file mode 100644 (file)
index 0000000..d53dbe5
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+integration_tests += [
+        integration_test_template + {
+                'name' : fs.name(meson.current_source_dir()),
+                'enabled' : false,
+        },
+]
index 73b72281ca943a442067a7a305fa535b36ad33a7..4a7931ab1e95be6b82b24b9e5e8fe304535d8787 100644 (file)
@@ -282,6 +282,7 @@ integration_test_template = {
         'priority' : 0,
         'firmware' : 'linux',
         'slow' : false,
+        'enabled' : true,
 }
 testdata_subdirs = [
         'auxv',
@@ -306,7 +307,7 @@ foreach dirname : [
         'TEST-05-RLIMITS',
         'TEST-06-SELINUX',
         'TEST-07-PID1',
-        'TEST-08-INITRD',
+        'TEST-08-INITRD',
         'TEST-09-REBOOT',
         'TEST-13-NSPAWN',
         'TEST-15-DROPIN',
@@ -317,7 +318,7 @@ foreach dirname : [
         'TEST-21-DFUZZER',
         'TEST-22-TMPFILES',
         'TEST-23-UNIT-FILE',
-        'TEST-24-CRYPTSETUP',
+        'TEST-24-CRYPTSETUP',
         'TEST-25-IMPORT',
         'TEST-26-SYSTEMCTL',
         'TEST-29-PORTABLE',
@@ -335,19 +336,19 @@ foreach dirname : [
         'TEST-50-DISSECT',
         'TEST-52-HONORFIRSTSHUTDOWN',
         'TEST-53-ISSUE-16347',
-        'TEST-54-CREDS',
+        '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-64-UDEV-STORAGE',
         'TEST-65-ANALYZE',
         'TEST-66-DEVICE-ISOLATION',
         'TEST-67-INTEGRITY',
         'TEST-68-PROPAGATE-EXIT-STATUS',
-        'TEST-69-SHUTDOWN',
+        'TEST-69-SHUTDOWN',
         'TEST-70-TPM2',
         'TEST-71-HOSTNAME',
         'TEST-72-SYSUPDATE',
@@ -359,7 +360,7 @@ foreach dirname : [
         'TEST-79-MEMPRESS',
         'TEST-80-NOTIFYACCESS',
         'TEST-81-GENERATORS',
-        'TEST-82-SOFTREBOOT',
+        'TEST-82-SOFTREBOOT',
         'TEST-83-BTRFS',
         'TEST-84-STORAGETM',
 ]
@@ -391,6 +392,10 @@ foreach integration_test : integration_tests
                 integration_test_env += {'SYSTEMD_SLOW_TESTS': '1'}
         endif
 
+        if not integration_test['enabled']
+                continue
+        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.