From 39d74773fc7f08bc3961d70434eb018817a948d4 Mon Sep 17 00:00:00 2001 From: Riyaz Faizullabhoy Date: Fri, 12 May 2017 11:10:26 -0700 Subject: [PATCH] Simple make test target Signed-off-by: Riyaz Faizullabhoy --- Makefile | 4 ++++ test/test.yml | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 test/test.yml diff --git a/Makefile b/Makefile index bd2288235..efed05871 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,10 @@ lint: # govet @test -z "$$(go tool vet -printf=false . 2>&1 | grep -v vendor/ | tee /dev/stderr)" +test: moby + ./moby build test/test.yml + rm moby test.iso test-cmdline test-efi.iso test-initrd.img test-kernel + PHONY: install install: moby cp -a $^ $(PREFIX)/bin/ diff --git a/test/test.yml b/test/test.yml new file mode 100644 index 000000000..7e11381a6 --- /dev/null +++ b/test/test.yml @@ -0,0 +1,62 @@ +# linuxkit.yml from linuxkit/linuxkit 2388f483c397010d528a9a97b71224dbdb3897b5 +kernel: + image: "linuxkit/kernel:4.9.x" + cmdline: "console=ttyS0 console=tty0 page_poison=1" +init: + - linuxkit/init:b3740303f3d1e5689a84c87b7dfb48fd2a40a192 + - linuxkit/runc:2649198589ef0020d99f613adaeda45ce0093a38 + - linuxkit/containerd:cf2614f5a96c569a0bd4bd54e054a65ba17d167f + - linuxkit/ca-certificates:3344cdca1bc59fdfa17bd7f0fcbf491b9dbaa288 +onboot: + - name: sysctl + image: "linuxkit/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c" + net: host + pid: host + ipc: host + capabilities: + - CAP_SYS_ADMIN + readonly: true + - name: binfmt + image: "linuxkit/binfmt:131026c0cf6084467316395fed3b358f64bda00c" + binds: + - /proc/sys/fs/binfmt_misc:/binfmt_misc + readonly: true + - name: dhcpcd + image: "linuxkit/dhcpcd:2def74ab3f9233b4c09ebb196ba47c27c08b0ed8" + binds: + - /var:/var + - /tmp/etc:/etc + capabilities: + - CAP_NET_ADMIN + - CAP_NET_BIND_SERVICE + - CAP_NET_RAW + net: host + command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] +services: + - name: rngd + image: "linuxkit/rngd:61a07ced77a9747708223ca16a4aec621eacf518" + capabilities: + - CAP_SYS_ADMIN + oomScoreAdj: -800 + readonly: true + - name: nginx + image: "nginx:alpine" + capabilities: + - CAP_NET_BIND_SERVICE + - CAP_CHOWN + - CAP_SETUID + - CAP_SETGID + - CAP_DAC_OVERRIDE + net: host +files: + - path: etc/docker/daemon.json + contents: '{"debug": true}' +trust: + image: + - linuxkit/kernel + - linuxkit/binfmt + - linuxkit/rngd +outputs: + - format: kernel+initrd + - format: iso-bios + - format: iso-efi