mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-12 21:29:59 +00:00
Update docs and test cases to work with latest format versions
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
@@ -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
|
22
test/cases/000_build/000_outputs/008_raw_bios/test.sh
Normal file
22
test/cases/000_build/000_outputs/008_raw_bios/test.sh
Normal 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
|
22
test/cases/000_build/000_outputs/009_raw_efi/test.sh
Normal file
22
test/cases/000_build/000_outputs/009_raw_efi/test.sh
Normal 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
|
@@ -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
|
@@ -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"
|
||||
|
22
test/cases/010_platforms/000_qemu/040_run_raw_bios/test.sh
Normal file
22
test/cases/010_platforms/000_qemu/040_run_raw_bios/test.sh
Normal 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
|
@@ -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"
|
||||
|
13
test/cases/010_platforms/000_qemu/050_run_aws/test.yml
Normal file
13
test/cases/010_platforms/000_qemu/050_run_aws/test.yml
Normal 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
|
Reference in New Issue
Block a user