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

+11 -11
View File
@@ -9,15 +9,15 @@ TEST_DIR=$(dirname "$0")
test_setup()
{
say "Test start $(date)"
texec sh -c "mkdir -p /etc/default"
run "mkdir -p /etc/default"
}
test_teardown()
{
say "Test done $(date)"
say "Running test teardown."
texec rm -f "$FINIT_CONF"
say "Running test teardown."
run "rm -f $FINIT_CONF"
}
# shellcheck source=/dev/null
@@ -27,21 +27,21 @@ test_teardown()
# if it cannot find "xyzzy", thus triggering a premature
# exit which Finit should act on to retstart it.
say "Setting up bogus /etc/default/serv"
texec sh -c "echo 'SERV_ARGS=\"-e xyzzy:lives\"' > /etc/default/serv"
run "echo 'SERV_ARGS=\"-e xyzzy:lives\"' > /etc/default/serv"
say "Add sysv stanza to $FINIT_CONF"
texec sh -c "echo 'sysv restart:5 [2345] pid:!/run/serv.pid name:serv /etc/init.d/S02-serv.sh -- Crashing SysV service' > $FINIT_CONF"
run "echo 'sysv restart:5 [2345] pid:!/run/serv.pid name:serv /etc/init.d/S02-serv.sh -- Crashing SysV service' > $FINIT_CONF"
#texec sh -c "initctl debug"
#run "initctl debug"
say 'Reload Finit'
texec sh -c "initctl reload"
#texec sh -c "initctl status serv"
#texec sh -c "ps"
run "initctl reload"
#run "initctl status serv"
#run "ps"
say 'Pending sysv restarts by Finit ...'
#texec sh -c "initctl status serv"
#texec sh -c "ps"
#run "initctl status serv"
#run "ps"
retry 'assert_restarts 5 serv' 20 1
return 0