test: minor, replace 'texec sh -c' -> 'run'

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-02-05 11:22:26 +01:00
1 parent 5a9cafc2fc
commit b6769356b2
21 files changed
+170 -165

No files matched your search

+8 -8
View File
@@ -12,24 +12,24 @@ TEST_DIR=$(dirname "$0")
test_teardown()
{
say "Test done $(date)"
say "Running test teardown."
texec rm -f "$FINIT_CONF"
say "Running test teardown."
run "rm -f $FINIT_CONF"
}
say "Test start $(date)"
rm -f "$TENV_ROOT"/oldpid
say "Add service stanza in $FINIT_CONF"
texec sh -c "echo 'service [2345] respawn log:stderr service.sh -- Test service' > $FINIT_CONF"
run "echo 'service [2345] respawn log:stderr service.sh -- Test service' > $FINIT_CONF"
say 'Reload Finit'
texec sh -c "initctl reload"
#texec sh -c "initctl status"
#texec sh -c "initctl debug"
run "initctl reload"
#run "initctl status"
#run "initctl debug"
retry 'assert_num_children 1 service.sh'
texec sh -c "initctl status service.sh"
run "initctl status service.sh"
say 'Simulate service crash (kill -9 ..)'
i=0
@@ -37,7 +37,7 @@ laps=1000
while [ $i -lt $laps ]; do
i=$((i + 1))
say "Lap $i/$laps, killing service ..." # we have this, no sleep needed
texec sh -c "slay service.sh"
run "slay service.sh"
done
retry 'assert_new_pid service.sh /run/service.pid'