]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Only add tpm2.target dependency to TEST-70-TPM2.service
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 14 May 2024 13:35:59 +0000 (15:35 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 14 May 2024 13:36:49 +0000 (15:36 +0200)
Let's not add the dependency unless required.

test/TEST-70-TPM2/meson.build
test/meson.build
test/test.service.in

index 8dec5f37e73a80d31833a772fa16883b02a07615..4e0bf908746f1b78194c6aa2173ca24dfda57f16 100644 (file)
@@ -3,5 +3,9 @@
 integration_tests += [
         integration_test_template + {
                 'name' : fs.name(meson.current_source_dir()),
+                'configuration' : integration_test_template['configuration'] + {
+                        'wants' : '@0@ tpm2.target'.format(integration_test_template['configuration']['wants']),
+                        'after' : '@0@ tpm2.target'.format(integration_test_template['configuration']['after']),
+                },
         },
 ]
index 61aa01089a9d84c03425c00f10ef43f2404df2cc..60d42efee6574997c46983fda3d522a09eb1dd73 100644 (file)
@@ -286,6 +286,8 @@ integration_test_template = {
         'configuration' : {
                 'memory-accounting' : 'no',
                 'command' : testdata_dir / 'units/%N.sh',
+                'wants' : '',
+                'after' : '',
         },
         'cmdline' : [],
 }
index 71e3618ec37ae49c5d775964bf75fb8ee71fea9d..57f2afbce1a0b9d7bfabc7c12b1d1d7cd65e983a 100644 (file)
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 [Unit]
 Description=%N
-Wants=basic.target network.target tpm2.target multi-user.target user@4711.service
-After=basic.target network.target tpm2.target user@4711.service
+Wants=basic.target network.target multi-user.target user@4711.service @wants@
+After=basic.target network.target user@4711.service @after@
 Before=getty-pre.target
 
 [Service]