test: Handle finit's default conf dirs/files better in test env

Signed-off-by: Magnus Malm <magnusmalm@gmail.com>
This commit is contained in:
Magnus Malm
2021-02-22 16:46:25 +01:00
parent adc9c40fe1
commit cd2fcac4cf
2 changed files with 6 additions and 2 deletions
+2
View File
@@ -22,6 +22,8 @@ mount -t tmpfs none /etc
# mkdir -p /dev/pts
# mount -t devpts none /dev/pts
mkdir -p "$FINIT_CONF_DIR"
tty=/dev/$(cat /sys/class/tty/console/active)
mkfifo "$tty"
+4 -2
View File
@@ -85,7 +85,8 @@ shift
trap teardown EXIT
FINIT_CONF=$(grep FINIT_CONF "$(dirname "$0")/../config.h" | cut -d' ' -f3 | cut -d'"' -f2)
export FINIT_CONF=$(grep FINIT_CONF "$(dirname "$0")/../config.h" | cut -d' ' -f3 | cut -d'"' -f2)
export FINIT_CONF_DIR="$(dirname "$FINIT_CONF")"/finit.d
log "$color_reset" 'Test start' ''
log "$color_reset" '--' ''
@@ -97,7 +98,8 @@ log "$color_reset" '--' ''
>&2 echo Filesystem:
>&2 ./testenv_start.sh find / -path /sys -prune -o -print -path /proc -prune -o -print
>&2 echo --
>&2 echo "FINIT_CONF='$FINIT_CONF"
>&2 echo "FINIT_CONF='$FINIT_CONF'"
>&2 echo "FINIT_CONF_DIR='$FINIT_CONF_DIR/'"
# Setup
./testenv_start.sh finit &