Update docs and test cases to work with latest format versions

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2017-10-30 13:48:32 +02:00
parent 1c2f959420
commit bc791e60e7
15 changed files with 89 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ clean_up() {
trap clean_up EXIT
moby build -format raw -name "${NAME}" ../test.yml
moby build -format aws -name "${NAME}" ../test.yml
[ -f "${NAME}.raw" ] || exit 1
exit 0

View File

@@ -0,0 +1,22 @@
#!/bin/sh
# SUMMARY: Check that raw output format is generated
# LABELS:
set -e
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
NAME=check
clean_up() {
rm -f ${NAME}*
}
trap clean_up EXIT
moby build -format raw-bios -name "${NAME}" ../test.yml
[ -f "${NAME}-bios.img" ] || exit 1
exit 0

View File

@@ -0,0 +1,22 @@
#!/bin/sh
# SUMMARY: Check that raw output format is generated
# LABELS:
set -e
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
NAME=check
clean_up() {
rm -f ${NAME}*
}
trap clean_up EXIT
moby build -format raw-efi -name "${NAME}" ../test.yml
[ -f "${NAME}-efi.img" ] || exit 1
exit 0

View File

@@ -16,7 +16,7 @@ clean_up() {
trap clean_up EXIT
moby build -format qcow2 -name "${NAME}" ../test.yml
moby build -format qcow2-bios -name "${NAME}" ../test.yml
[ -f "${NAME}.qcow2" ] || exit 1
exit 0

View File

@@ -15,7 +15,7 @@ clean_up() {
}
trap clean_up EXIT
moby build -format qcow2 -name "${NAME}" test.yml
moby build -format qcow2-bios -name "${NAME}" test.yml
[ -f "${NAME}.qcow2" ] || exit 1
linuxkit run qemu "${NAME}.qcow2" | grep -q "Welcome to LinuxKit"

View File

@@ -0,0 +1,22 @@
#!/bin/sh
# SUMMARY: Check that raw image boots in qemu
# LABELS:
set -e
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
NAME=qemu-raw
clean_up() {
rm -rf ${NAME}*
}
trap clean_up EXIT
moby build -format raw-bios -name "${NAME}" test.yml
[ -f "${NAME}-bios.img" ] || exit 1
linuxkit run qemu "${NAME}-bios.img" | grep -q "Welcome to LinuxKit"
exit 0

View File

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

View File

@@ -0,0 +1,13 @@
kernel:
image: linuxkit/kernel:4.9.59
cmdline: "console=ttyS0"
init:
- linuxkit/init:42a92119e1ca10380e0d33e26c0cbcf85b9b3558
- linuxkit/runc:817fdc592eac6cb7804fa1721a43a7f6e23fb50f
onboot:
- name: poweroff
image: linuxkit/poweroff:280bd01daa8776fbe1f4d912977f1886b8374834
command: ["/bin/sh", "/poweroff.sh", "10"]
trust:
org:
- linuxkit