Improve hyperkit/osx testing

Address #954:
- Pull hyperkit and vpnkit binaries from CI
- Use vpnkit instead of vmnet
- Add hyperkit-test test target

Signed-off-by: Robb Kistler <robb.kistler@docker.com>
This commit is contained in:
Robb Kistler
2017-01-17 18:47:07 -08:00
parent 3ef65e50f2
commit 29e3d74c2a
3 changed files with 31 additions and 17 deletions

View File

@@ -3,22 +3,21 @@
set -e
KERNEL="alpine/kernel/x86_64/vmlinuz64"
INITRD="alpine/initrd.img"
: ${INITRD:="alpine/initrd.img"}
CMDLINE="earlyprintk=serial console=ttyS0"
[ -f disk.img ] || dd if=/dev/zero of=disk.img bs=1m count=256
MEM="-m 1G"
SMP="-c 1"
NET=""
if (( $EUID != 0 )); then
printf "Need to run as root to get networking!\n\n"
exit 1
fi
NET="-s 2:0,virtio-net"
SLIRP_SOCK=$(mktemp)
NET="-s 2:0,virtio-vpnkit,path=$SLIRP_SOCK"
IMG_HDD="-s 4,virtio-blk,disk.img"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
RND="-s 5,virtio-rnd"
LPC_DEV="-l com1,stdio"
hyperkit.git/build/com.docker.hyperkit -A $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_HDD $RND -u -f kexec,$KERNEL,$INITRD,"$CMDLINE"
hyperkit.bin/com.docker.slirp --ethernet $SLIRP_SOCK &>/dev/null &
trap "kill $!; rm $SLIRP_SOCK" EXIT
hyperkit.bin/com.docker.hyperkit -A $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_HDD $RND -u -f kexec,$KERNEL,$INITRD,"$CMDLINE"