]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Move StateDirectory= directive into dropin
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 10 Jan 2025 13:51:24 +0000 (14:51 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 15 Jan 2025 09:56:07 +0000 (09:56 +0000)
The integration-test-setup calls require StateDirectory= but some
tests override the test unit used which then won't have StateDirectory=
so let's move StateDirectory= into the dropin as well to avoid this
issue.

(cherry picked from commit 1f17ec0ed419627a686ee6e719ac7f55cf082ada)

test/integration-test-wrapper.py
test/test.service.in

index 94904cfbc4c0566ec0144cf2e193b34ecfe5225b..610c34c9034257d49fd1577122ecaa2f2d2568f5 100755 (executable)
@@ -470,6 +470,7 @@ def main() -> None:
             [Service]
             ExecStartPre=/usr/lib/systemd/tests/testdata/integration-test-setup.sh setup
             ExecStopPost=/usr/lib/systemd/tests/testdata/integration-test-setup.sh finalize
+            StateDirectory=%N
             """
         )
 
index 75f703698f6875ba3a2006a165866da673f84644..790c513da4338e7073277523eca50af9d22a42e4 100644 (file)
@@ -10,4 +10,3 @@ ExecStartPre=rm -f /failed /testok
 ExecStart=@command@
 Type=oneshot
 MemoryAccounting=@memory-accounting@
-StateDirectory=%N