test: Fix chroot not in PATH

Signed-off-by: Jacques de Laval <jacques@de-laval.se>
This commit is contained in:
Jacques de Laval committed 2021-02-20 13:06:28 +01:00
1 parent 99ad26236e
commit 7965dbd13f
3 files changed
+7 -3

No files matched your search

+2 -1
View File
@@ -8,6 +8,7 @@ TESTS_ROOT="$(pwd)/${TEST_DIR}/test_root"
>&2 echo "Hint: Execute '${TEST_DIR}/testenv_exec.sh \$(pgrep -P $$) /bin/sh; reset' to enter the test namespace"
unshare=$(which unshare)
chroot=$(which chroot)
# Not supported by Busybox unshare:
# --cgroup --time
@@ -18,4 +19,4 @@ exec "$unshare" \
--mount \
--mount-proc \
--uts --ipc --net \
chroot "$TESTS_ROOT" /bin/chrootsetup.sh "$@"
"$chroot" "$TESTS_ROOT" /bin/chrootsetup.sh "$@"