mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 02:21:34 +00:00
Split linuxkit.build.outputs into distinct tests
This test was building all the supported output formats and so was taking orders of magnitude longer than every other test. It was also obscuring which output formats were slow and/or broken. The vhd test remains skipped. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
3891a179e5
commit
89e7627576
26
test/cases/000_build/000_outputs/000_kernel+initrd/test.sh
Normal file
26
test/cases/000_build/000_outputs/000_kernel+initrd/test.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that kernel+initrd 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() {
|
||||
# remove any images
|
||||
find . -depth -iname "${NAME}*" -exec rm -rf {} \;
|
||||
rm -f test.yml
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output kernel+initrd -name "${NAME}" ../test.yml
|
||||
[ -f "${NAME}-kernel" ] || exit 1
|
||||
[ -f "${NAME}-initrd.img" ] || exit 1
|
||||
[ -f "${NAME}-cmdline" ] || exit 1
|
||||
|
||||
exit 0
|
24
test/cases/000_build/000_outputs/001_iso-bios/test.sh
Normal file
24
test/cases/000_build/000_outputs/001_iso-bios/test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that iso-bios 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() {
|
||||
# remove any images
|
||||
find . -depth -iname "${NAME}*" -exec rm -rf {} \;
|
||||
rm -f test.yml
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output iso-bios -name "${NAME}" ../test.yml
|
||||
[ -f "${NAME}.iso" ] || exit 1
|
||||
|
||||
exit 0
|
24
test/cases/000_build/000_outputs/002_iso-efi/test.sh
Normal file
24
test/cases/000_build/000_outputs/002_iso-efi/test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that iso-efi 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() {
|
||||
# remove any images
|
||||
find . -depth -iname "${NAME}*" -exec rm -rf {} \;
|
||||
rm -f test.yml
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output iso-efi -name "${NAME}" ../test.yml
|
||||
[ -f "${NAME}-efi.iso" ] || exit 1
|
||||
|
||||
exit 0
|
24
test/cases/000_build/000_outputs/003_gcp/test.sh
Normal file
24
test/cases/000_build/000_outputs/003_gcp/test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that gcp 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() {
|
||||
# remove any images
|
||||
find . -depth -iname "${NAME}*" -exec rm -rf {} \;
|
||||
rm -f test.yml
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output gcp -name "${NAME}" ../test.yml
|
||||
[ -f "${NAME}.img.tar.gz" ] || exit 1
|
||||
|
||||
exit 0
|
24
test/cases/000_build/000_outputs/004_raw/test.sh
Normal file
24
test/cases/000_build/000_outputs/004_raw/test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/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() {
|
||||
# remove any images
|
||||
find . -depth -iname "${NAME}*" -exec rm -rf {} \;
|
||||
rm -f test.yml
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output raw -name "${NAME}" ../test.yml
|
||||
[ -f "${NAME}.raw" ] || exit 1
|
||||
|
||||
exit 0
|
24
test/cases/000_build/000_outputs/005_qcow2/test.sh
Normal file
24
test/cases/000_build/000_outputs/005_qcow2/test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that qcow2 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() {
|
||||
# remove any images
|
||||
find . -depth -iname "${NAME}*" -exec rm -rf {} \;
|
||||
rm -f test.yml
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output qcow2 -name "${NAME}" ../test.yml
|
||||
[ -f "${NAME}.qcow2" ] || exit 1
|
||||
|
||||
exit 0
|
25
test/cases/000_build/000_outputs/006_vhd/test.sh
Normal file
25
test/cases/000_build/000_outputs/006_vhd/test.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that vhd format is generated
|
||||
# LABELS: skip
|
||||
# VHD currently requires a lot of memory, disable for now
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=check
|
||||
|
||||
clean_up() {
|
||||
# remove any images
|
||||
find . -depth -iname "${NAME}*" -exec rm -rf {} \;
|
||||
rm -f test.yml
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output vhd -name "${NAME}" ../test.yml
|
||||
[ -f "${NAME}.vhd" ] || exit 1
|
||||
|
||||
exit 0
|
24
test/cases/000_build/000_outputs/007_vmdk/test.sh
Normal file
24
test/cases/000_build/000_outputs/007_vmdk/test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that vmdk 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() {
|
||||
# remove any images
|
||||
find . -depth -iname "${NAME}*" -exec rm -rf {} \;
|
||||
rm -f test.yml
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output vmdk -name "${NAME}" ../test.yml
|
||||
[ -f "${NAME}.vmdk" ] || exit 1
|
||||
|
||||
exit 0
|
@ -1,33 +0,0 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that all supported output formats are generated
|
||||
# LABELS:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=check
|
||||
|
||||
clean_up() {
|
||||
# remove any images
|
||||
find . -depth -iname "${NAME}*" -exec rm -rf {} \;
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -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.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
|
||||
[ -f "${NAME}.vmdk" ] || exit 1
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user