Merge pull request #1983 from justincormack/mobyup

Update Moby tool
This commit is contained in:
Justin Cormack
2017-06-07 20:56:26 +01:00
committed by GitHub
14 changed files with 20 additions and 20 deletions

View File

@@ -31,7 +31,7 @@ gcp-hack: ../artifacts/test.img.tar.gz
../artifacts/test.img.tar.gz:
rm -rf ../artifacts
mkdir -p ../artifacts
$(MOBY) build -output gcp-img -pull -name ../artifacts/test hack/test.yml
$(MOBY) build -output gcp -pull -name ../artifacts/test hack/test.yml
define check_test_log
@cat $1 |grep -q 'test suite PASSED'
@@ -40,7 +40,7 @@ endef
.PHONY: ltp
ltp: export CLOUDSDK_IMAGE_NAME?=test-ltp
ltp: $(LINUXKIT) test-ltp.img.tar.gz
$(MOBY) build -output gcp-img -pull hack/test-ltp.yml
$(MOBY) build -output gcp -pull hack/test-ltp.yml
$(LINUXKIT) push gcp test-ltp.img.tar.gz
$(LINUXKIT) run gcp -skip-cleanup -machine n1-highcpu-4 $(CLOUDSDK_IMAGE_NAME) | tee test-ltp.log
$(call check_test_log, test-ltp.log)

View File

@@ -17,15 +17,14 @@ clean_up() {
trap clean_up EXIT
moby build -disable-content-trust -output tar,kernel+initrd,iso-bios,iso-efi,img,img-gz,qcow2,vmdk -name "${NAME}" test.yml
[ -f "${NAME}.tar" ] || exit 1
moby build -disable-content-trust -output kernel+initrd,iso-bios,iso-efi,gcp,raw,qcow2,vmdk -name "${NAME}" test.yml
[ -f "${NAME}-kernel" ] || exit 1
[ -f "${NAME}-initrd.img" ] || exit 1
[ -f "${NAME}-cmdline" ] || exit 1
[ -f "${NAME}.iso" ] || exit 1
[ -f "${NAME}-efi.iso" ] || exit 1
[ -f "${NAME}.img" ] || exit 1
[ -f "${NAME}.img.gz" ] || exit 1
[ -f "${NAME}.img.tar.gz" ] || exit 1
[ -f "${NAME}.raw" ] || exit 1
[ -f "${NAME}.qcow2" ] || exit 1
# VHD currently requires a lot of memory, disable for now
# [ -f "${NAME}.vhd" ] || exit 1

View File

@@ -17,7 +17,7 @@ clean_up() {
trap clean_up EXIT
moby build -output img -name "${NAME}" test.yml
[ -f "${NAME}.img" ] || exit 1
linuxkit run qemu "${NAME}.img" | grep -q "Welcome to LinuxKit"
moby build -output raw -name "${NAME}" test.yml
[ -f "${NAME}.raw" ] || exit 1
linuxkit run qemu "${NAME}.raw" | grep -q "Welcome to LinuxKit"
exit 0

View File

@@ -15,7 +15,7 @@ clean_up() {
trap clean_up EXIT
# Test code goes here
moby build -output kernel+initrd test-kernel-config
moby build -output kernel+initrd test-kernel-config.yml
RESULT="$(linuxkit run qemu -kernel test-kernel-config)"
echo "${RESULT}" | grep -q "suite PASSED"

View File

@@ -15,7 +15,7 @@ clean_up() {
trap clean_up EXIT
# Test code goes here
moby build -output kernel+initrd test-kernel-config
moby build -output kernel+initrd test-kernel-config.yml
RESULT="$(linuxkit run qemu test-kernel-config)"
echo "${RESULT}" | grep -q "suite PASSED"

View File

@@ -15,7 +15,7 @@ clean_up() {
trap clean_up EXIT
# Test code goes here
moby build -output kernel+initrd test-kernel-config
moby build -output kernel+initrd test-kernel-config.yml
RESULT="$(linuxkit run qemu test-kernel-config)"
echo "${RESULT}" | grep -q "suite PASSED"

View File

@@ -22,6 +22,6 @@ docker pull linuxkit/kernel:4.9.x
# Build a package
docker build -t ${IMAGE_NAME} .
# Build a LinuxKit image with kernel module (and test script)
moby build -output kernel+initrd kmod
moby build -output kernel+initrd kmod.yml
# Run it
linuxkit run qemu kmod | grep -q "Hello LinuxKit"

View File

@@ -16,7 +16,7 @@ clean_up() {
trap clean_up EXIT
# Test code goes here
moby build -output kernel+initrd test-binfmt
moby build -output kernel+initrd test-binfmt.yml
RESULT="$(linuxkit run qemu -kernel test-binfmt)"
echo "${RESULT}"
echo "${RESULT}" | grep -q "suite PASSED"

View File

@@ -16,7 +16,7 @@ clean_up() {
trap clean_up EXIT
# Test code goes here
moby build -output kernel+initrd test-ca-certificates
moby build -output kernel+initrd test-ca-certificates.yml
RESULT="$(linuxkit run qemu -kernel test-ca-certificates)"
echo "${RESULT}"
echo "${RESULT}" | grep -q "suite PASSED"

View File

@@ -16,7 +16,7 @@ clean_up() {
trap clean_up EXIT
# Test code goes here
moby build -output kernel+initrd test-dhcpcd
moby build -output kernel+initrd test-dhcpcd.yml
RESULT="$(linuxkit run qemu -kernel test-dhcpcd)"
echo "${RESULT}"
echo "${RESULT}" | grep -q "suite PASSED"

View File

@@ -16,7 +16,7 @@ clean_up() {
trap clean_up EXIT
# Test code goes here
moby build -output kernel+initrd test-sysctl
moby build -output kernel+initrd test-sysctl.yml
RESULT="$(linuxkit run qemu -kernel test-sysctl)"
echo "${RESULT}"
echo "${RESULT}" | grep -q "suite PASSED"