mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
test: Only mess with PATH inside test environment
This commit is contained in:
+2
-2
@@ -14,12 +14,12 @@ if [ ! -f "$srcdir"/../config.status ]; then
|
||||
cp "${srcdir}/test-root/Makefile" test-root/
|
||||
make -C test-root/
|
||||
config_h='./config.h'
|
||||
echo "export PATH=/bin:/sbin" > test.env
|
||||
echo "export TESTENV_PATH=/bin:/sbin" > test.env
|
||||
else
|
||||
make -C ../ DESTDIR="$(pwd)/test-root/" install
|
||||
FINITBIN=../../src/finit make -C test-root/
|
||||
config_h='../config.h'
|
||||
echo "export PATH=/bin:/sbin:$PREFIX/sbin:$PREFIX/bin" > test.env
|
||||
echo "export TESTENV_PATH=/bin:/sbin:$PREFIX/sbin:$PREFIX/bin" > test.env
|
||||
fi
|
||||
|
||||
echo "export FINIT_CONF=$(grep FINIT_CONF $config_h | cut -d' ' -f3 | cut -d'"' -f2)" >> test.env
|
||||
|
||||
@@ -20,4 +20,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PATH="$TESTENV_PATH"
|
||||
export PATH
|
||||
|
||||
"$(dirname "$0")"/testenv_exec.sh "$target" "$cmd" "$@"
|
||||
|
||||
@@ -21,6 +21,9 @@ export PS2='> '
|
||||
export PS3='#? '
|
||||
export PS4='+ '
|
||||
|
||||
PATH="$TESTENV_PATH"
|
||||
export PATH
|
||||
|
||||
"$nsenter" \
|
||||
--preserve-credentials \
|
||||
--user \
|
||||
|
||||
@@ -13,6 +13,9 @@ export PS2='> '
|
||||
export PS3='#? '
|
||||
export PS4='+ '
|
||||
|
||||
PATH="$TESTENV_PATH"
|
||||
export PATH
|
||||
|
||||
# Not supported by Busybox unshare:
|
||||
# --cgroup --time
|
||||
exec "$unshare" \
|
||||
|
||||
Reference in New Issue
Block a user