mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
16 lines
310 B
Bash
Executable File
16 lines
310 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
TEST_DIR=$(dirname "$0")
|
|
TESTS_ROOT="${TEST_DIR}/test_root"
|
|
|
|
cp "${TEST_DIR}/testwrapper.sh" "${TESTS_ROOT}/usr/local/bin/"
|
|
|
|
unshare \
|
|
--user --map-root-user \
|
|
--fork --pid --mount-proc \
|
|
--mount \
|
|
--mount-proc \
|
|
chroot "$TESTS_ROOT" /usr/local/bin/testwrapper.sh "$@"
|