mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
Use bin dir and clean up hyperkit test
- make a `bin/` directory - make hyperkit-test pass, as it writes to pty so redirect was not working Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
6724a8780d
commit
3e020abdb2
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,6 @@
|
||||
test.log
|
||||
/bin
|
||||
*.swp
|
||||
/hyperkit.bin
|
||||
*.img
|
||||
*.tag
|
||||
*.iso
|
||||
|
19
Makefile
19
Makefile
@ -31,27 +31,28 @@ qemu-iso: alpine/mobylinux-bios.iso
|
||||
qemu-gce: alpine/gce.img.tar.gz
|
||||
docker run -it --rm -v $(CURDIR)/alpine/gce.img.tar.gz:/tmp/gce.img.tar.gz $(QEMU_IMAGE)
|
||||
|
||||
hyperkit.bin:
|
||||
mkdir $@
|
||||
bin:
|
||||
mkdir -p $@
|
||||
|
||||
hyperkit.bin/com.docker.hyperkit: hyperkit.bin
|
||||
bin/com.docker.hyperkit: bin
|
||||
curl -fsSL https://circleci.com/api/v1/project/docker/hyperkit/latest/artifacts/0//Users/distiller/hyperkit/build/com.docker.hyperkit > $@
|
||||
chmod a+x $@
|
||||
|
||||
hyperkit.bin/com.docker.slirp:
|
||||
bin/com.docker.slirp: bin
|
||||
curl -fsSL https://circleci.com/api/v1/project/docker/vpnkit/latest/artifacts/0//Users/distiller/vpnkit/com.docker.slirp.tgz \
|
||||
| tar xz --strip=2 -C hyperkit.bin Contents/MacOS/com.docker.slirp
|
||||
| tar xz --strip=2 -C $(dir $@) Contents/MacOS/com.docker.slirp
|
||||
touch $@
|
||||
|
||||
hyperkit: hyperkit.sh hyperkit.bin/com.docker.hyperkit hyperkit.bin/com.docker.slirp alpine/initrd.img alpine/kernel/x86_64/vmlinuz64
|
||||
hyperkit: hyperkit.sh bin/com.docker.hyperkit bin/com.docker.slirp alpine/initrd.img alpine/kernel/x86_64/vmlinuz64
|
||||
./hyperkit.sh
|
||||
|
||||
define check_test_log
|
||||
@cat $1 |grep -q 'Moby test suite PASSED'
|
||||
endef
|
||||
|
||||
hyperkit-test: hyperkit.sh hyperkit.bin/com.docker.hyperkit hyperkit.bin/com.docker.slirp alpine/initrd-test.img alpine/kernel/x86_64/vmlinuz64
|
||||
hyperkit-test: hyperkit.sh bin/com.docker.hyperkit bin/com.docker.slirp alpine/initrd-test.img alpine/kernel/x86_64/vmlinuz64
|
||||
rm -f disk.img
|
||||
INITRD=alpine/initrd-test.img ./hyperkit.sh 2>&1 | tee test.log
|
||||
INITRD=alpine/initrd-test.img script -q /dev/null ./hyperkit.sh | tee test.log
|
||||
$(call check_test_log, test.log)
|
||||
|
||||
test: alpine/initrd-test.img alpine/kernel/x86_64/vmlinuz64
|
||||
@ -125,4 +126,4 @@ ci-pr:
|
||||
|
||||
clean:
|
||||
$(MAKE) -C alpine clean
|
||||
rm -rf hyperkit.bin disk.img test.log
|
||||
rm -rf bin disk.img test.log
|
||||
|
@ -17,7 +17,7 @@ PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
|
||||
RND="-s 5,virtio-rnd"
|
||||
LPC_DEV="-l com1,stdio"
|
||||
|
||||
hyperkit.bin/com.docker.slirp --ethernet $SLIRP_SOCK &>/dev/null &
|
||||
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"
|
||||
bin/com.docker.hyperkit -A $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_HDD $RND -u -f kexec,$KERNEL,$INITRD,"$CMDLINE"
|
||||
|
Loading…
Reference in New Issue
Block a user