test: Run end.sh when running integration tests with mkosi
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 2 Jun 2024 08:59:09 +0000 (10:59 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 2 Jun 2024 17:15:21 +0000 (19:15 +0200)
test/integration-test-wrapper.py
test/units/end.service
test/units/end.sh

index 5b098a3e01f3c95e93f3981ea60a8e27fe990492..0c9649301c4f772415412a39f3e22751c7e85a47 100755 (executable)
@@ -71,6 +71,7 @@ def main():
 
         [Service]
         StandardOutput=journal+console
+        ExecStart=/usr/lib/systemd/tests/testdata/units/end.sh
         """
     )
 
index 50a68b9dd49d8f00ef34aa4e168b3bf9203398a2..5455a8f33b8a5e975664bbf996f5d41757f8e24b 100644 (file)
@@ -3,6 +3,7 @@
 Description=End the test
 After=testsuite.target
 OnFailure=poweroff.target
+OnSuccess=poweroff.target
 OnFailureJobMode=replace-irreversibly
 
 [Service]
index cc1d7ee11ebbdfb95f984228b3b4fba726a1750b..a18c9473eaf3629887eab731a3f8c43d5f8bd904 100755 (executable)
@@ -13,5 +13,4 @@ set -o pipefail
 (! journalctl -q -o short-monotonic --grep "[F]ailed to parse serialized line" >>/failed)
 (! journalctl -q -o short-monotonic --grep "[F]ailed to (de)?serialize \w+" >>/failed)
 
-systemctl poweroff --no-block
 exit 0