test: help finit know its under test

This trick can also be used by others who want to run Finit in an
unshare.  Set the container environment variable to 'unshare',
like lxc and docker do for their products.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-03-23 06:27:33 +01:00
parent 063d645d95
commit d16f7e0c88
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -29,6 +29,7 @@ TENV_ROOT="${TENV_ROOT:-$(pwd)/${TEST_DIR}/tenv-root}"
unshare=$(command -v unshare)
chroot=$(command -v chroot)
export container="unshare"
export PS1='\w \$ '
export PS2='> '
export PS3='#? '