forked from josch/mmdebstrap
Johannes 'josch' Schauer
2618a587a0
On machines without kvm using qemu is not practical. Now, most tests can be run without a container. Also add support for missing unshare, proot and binfmt.
32 lines
455 B
Bash
Executable file
32 lines
455 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
cachedir="./shared/cache"
|
|
|
|
SUDO=
|
|
while [ "$#" -gt 0 ]; do
|
|
key="$1"
|
|
case "$key" in
|
|
SUDO)
|
|
SUDO=sudo
|
|
;;
|
|
*)
|
|
echo "Unknown argument: $key"
|
|
exit 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
# subshell so that we can cd without effecting the rest
|
|
(
|
|
set +e
|
|
cd ./shared;
|
|
$SUDO sh ./test.sh;
|
|
echo $?;
|
|
) 2>&1 | tee shared/result.txt | head --lines=-1
|
|
if [ "$(tail --lines=1 shared/result.txt)" -ne 0 ]; then
|
|
echo "test.sh failed"
|
|
exit 1
|
|
fi
|