liminix/tests/pppoe/run.sh
Daniel Barlow c1835d97ee add pppoe
2022-09-25 11:54:31 +01:00

20 lines
533 B
Bash
Executable file

#!/usr/bin/env sh
set -e
cleanup(){
echo "do cleanup";
}
trap cleanup EXIT
trap 'echo "command $(eval echo $BASH_COMMAND) failed with exit code $?"; exit $?' ERR
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-build '<liminix>' -I liminix-config=./configuration.nix --arg device "import <liminix/devices/qemu.nix>" -A outputs.default $*
if ! ( echo "cont" | socat - unix-connect:../support/ppp-server/qemu-monitor); then
echo "need pppoe server running"
exit 1
fi
../../scripts/run-qemu.sh result/vmlinux result/squashfs