]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test: move poweroff handling from test case to test module
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Wed, 19 Oct 2022 00:05:57 +0000 (00:05 +0000)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Mon, 7 Nov 2022 17:04:47 +0000 (18:04 +0100)
modules.d/80test/hard-off.sh [moved from test/TEST-03-USR-MOUNT/hard-off.sh with 100% similarity]
modules.d/80test/module-setup.sh
test/TEST-03-USR-MOUNT/test.sh

index 74de1b80ed704168a5301244206d5b692d0f9ab9..96041a93db27ec1857983a560c0e53e20adadc9b 100755 (executable)
@@ -10,4 +10,7 @@ depends() {
 }
 
 install() {
+    inst poweroff
+    inst_hook shutdown-emergency 000 "$moddir/hard-off.sh"
+    inst_hook emergency 000 "$moddir/hard-off.sh"
 }
index 9fbe40de52a0a650b3e8164ff922d2340fc7444e..5fffcf30ad1f30f354313b74dfdd585c14651277 100755 (executable)
@@ -132,9 +132,7 @@ test_setup() {
         export initdir=$TESTDIR/overlay
         # shellcheck disable=SC1090
         . "$basedir"/dracut-init.sh
-        inst_multiple poweroff dd
-        inst_hook shutdown-emergency 000 ./hard-off.sh
-        inst_hook emergency 000 ./hard-off.sh
+        inst_multiple dd
     )
     "$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \
         -a "test watchdog" \