mirror of
https://github.com/troglobit/finit.git
synced 2026-10-19 11:09:35 +00:00
WIP: test makefile
This commit is contained in:
1 parent
aa9a5fbb99
commit
4f82cb8261
6 files changed
+128
-7
No files matched your search
+9
-5
@@ -1,15 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
set -eu
|
||||
|
||||
TEST_DIR=$(dirname "$0")
|
||||
TESTS_ROOT="${TEST_DIR}/test_root"
|
||||
TESTS_ROOT="$(pwd)/${TEST_DIR}/test_root"
|
||||
|
||||
cp "${TEST_DIR}/testwrapper.sh" "${TESTS_ROOT}/usr/local/bin/"
|
||||
echo "Hint: Execute './test/testenter.sh \$(pgrep -P $$) /bin/sh; reset' to enter the test namespace"
|
||||
|
||||
unshare \
|
||||
# Not supported by Busybox unshare:
|
||||
# --cgroup --time
|
||||
export PATH=/sbin:/bin
|
||||
exec unshare \
|
||||
--user --map-root-user \
|
||||
--fork --pid --mount-proc \
|
||||
--mount \
|
||||
--mount-proc \
|
||||
chroot "$TESTS_ROOT" /usr/local/bin/testwrapper.sh "$@"
|
||||
--uts --ipc --net \
|
||||
chroot "$TESTS_ROOT" /bin/testwrapper.sh "$@"
|
||||
Reference in new issue
Block a user