test: Add support for starting Finit in debug mode

Signed-off-by: Jacques de Laval <jacques@de-laval.se>
This commit is contained in:
Jacques de Laval
2021-02-25 00:53:30 +01:00
parent 70964ccb35
commit 691bc58f0e
+6 -2
View File
@@ -16,7 +16,7 @@ pause() {
toggle_finit_debug() {
say 'Toggle finit debug'
texec sh -c "/bin/initctl debug"
texec initctl debug
sleep 0.5
}
@@ -104,7 +104,11 @@ export TEST_NAME
# Setup test environment
# Setup test environment
"$TEST_DIR/testenv_start.sh" finit &
if [ -n "${DEBUG:-}" ]; then
FINIT_ARGS="${FINIT_ARGS:-} finit.debug=on"
fi
# shellcheck disable=2086
"$TEST_DIR/testenv_start.sh" finit ${FINIT_ARGS:-} &
finit_ppid=$!
echo "$finit_ppid" > "$TESTS_ROOT"/running_test.pid