mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-05-05 13:58:49 +00:00
Add a test suite ✅
This adds a test suite to be executed using `linuxkit/rtf`. This is installed in the top-level Makefile The tests are written in shell script and cover the following cases: - Kernel Config is OK! - Kernel Modules can be built and loaded - QEMU can build and run kernel+initrd, iso-bios and iso-uefi - That we can build for all other supported output formats - That all of the examples in `./examples` can be built - The LTP tests can be run (if `-l slow` is provided) The virtsock and docker-bench tests were migrated but no test has been written as yet as AFAICT they are still a WIP Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
12
Makefile
12
Makefile
@@ -1,5 +1,5 @@
|
||||
.PHONY: default all
|
||||
default: bin/moby bin/linuxkit
|
||||
default: bin/moby bin/linuxkit bin/rtf
|
||||
all: default
|
||||
|
||||
VERSION="0.0" # dummy for now
|
||||
@@ -24,6 +24,15 @@ bin/moby: | bin
|
||||
rm tmp_moby_bin.tar
|
||||
touch $@
|
||||
|
||||
RTF_COMMIT=3ced00340aacfc1932e8c03281bf3bfc586c147c
|
||||
RTF_CMD=github.com/linuxkit/rtf/cmd
|
||||
bin/rtf: | bin
|
||||
docker run --rm --log-driver=none $(CROSS) $(GO_COMPILE) --clone-path github.com/linuxkit/rtf --clone https://github.com/linuxkit/rtf.git --commit $(RTF_COMMIT) --package github.com/linuxkit/rtf --ldflags "-X $(RTF_CMD).GitCommit=$(RTF_COMMIT) -X $(RTF_CMD).Version=$(VERSION)" -o $@ > tmp_rtf_bin.tar
|
||||
tar xf tmp_rtf_bin.tar > $@
|
||||
rm tmp_rtf_bin.tar
|
||||
touch $@
|
||||
|
||||
|
||||
LINUXKIT_DEPS=$(wildcard src/cmd/linuxkit/*.go) Makefile vendor.conf
|
||||
bin/linuxkit: $(LINUXKIT_DEPS) | bin
|
||||
tar cf - vendor -C src/cmd/linuxkit . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/linuxkit/linuxkit --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o $@ > tmp_linuxkit_bin.tar
|
||||
@@ -66,4 +75,3 @@ ci-pr:
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf bin *.log *-kernel *-cmdline *.img *.iso *.gz *.qcow2 *.vhd *.vmx *.vmdk *.tar
|
||||
$(MAKE) -C test clean
|
||||
|
||||
Reference in New Issue
Block a user