diff --git a/test/runtest.sh b/test/runtest.sh index 00c3d3de..bb20d02f 100755 --- a/test/runtest.sh +++ b/test/runtest.sh @@ -47,6 +47,8 @@ shift trap teardown EXIT +FINIT_CONF=$(grep FINIT_CONF "$(dirname "$0")/../config.h" | cut -d' ' -f3 | cut -d'"' -f2) + log "$color_reset" 'Test start' '' log "$color_reset" '--' '' @@ -57,6 +59,7 @@ 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" # Setup ./testenv_start.sh finit & diff --git a/test/test_start_stop_service/test.sh b/test/test_start_stop_service/test.sh index ffe6f465..93e97223 100755 --- a/test/test_start_stop_service/test.sh +++ b/test/test_start_stop_service/test.sh @@ -5,7 +5,7 @@ set -eu # Test say 'Set up a service' cp "$TEST_DIR"/service.sh test_root/bin -texec sh -c 'echo "service [2345] kill:20 log /bin/service.sh" > /etc/finit.conf' +texec sh -c "echo 'service [2345] kill:20 log /bin/service.sh' > $FINIT_CONF" say 'Reload Finit' texec kill -SIGHUP 1 @@ -15,7 +15,7 @@ service_pids=$(texec pgrep -P 1 | wc -l) assert 'One service is running' "$service_pids" -eq 1 say 'Remove the service' -texec sh -c 'echo > /etc/finit.conf' +texec sh -c "echo > $FINIT_CONF" say 'Reload Finit' texec kill -SIGHUP 1