Files
linuxkit/test/cases/040_packages/013_mkimage/test.sh
Rolf Neugebauer ad48a174ba tests: Fix packages tests for arm64
- Enable console for arm64 for all tests
- linuxkit.packages.binfmt is x86_64 only for now
- linuxkit.packages.format_mount.by_name seems to hang with no output.
  needs investigating...
- linuxkit.packages.getty-containerd is x86_64 specific
- linuxkit.packages.mkimage is x86_64 specific
- linuxkit.packages.wireguard: Use the non-alpine variant as it is
  available as a multiarch for arm64. Use a specific version/tag (1.13.7)
  as currently 'latest' seem to have issues.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-12 23:34:57 +00:00

28 lines
802 B
Bash

#!/bin/sh
# SUMMARY: Test the mkimage container by using it to build a bootable qcow2
# LABELS: amd64
# REPEAT:
set -e
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
clean_up() {
find . -depth -iname "run*" -not -iname "*.yml" -exec rm -rf {} \;
find . -depth -iname "mkimage*" -not -iname "*.yml" -exec rm -rf {} \;
find . -depth -iname "disk.qcow2*" -not -iname "*.yml" -exec rm -rf {} \;
rm -f tarball.img
}
trap clean_up EXIT
# Test code goes here
linuxkit build -format kernel+initrd run.yml
linuxkit build -format kernel+initrd mkimage.yml
tar cf tarball.img run-kernel run-initrd.img run-cmdline
linuxkit run qemu -disk disk.qcow2,size=200M,format=qcow2 -disk tarball.img,format=raw -kernel mkimage
linuxkit run qemu disk.qcow2
exit 0