mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-11 20:00:28 +00:00
Merge pull request #1982 from rneugeba/hyperkit
Convert some tests to run on hyperkit when run on OSX
This commit is contained in:
@@ -10,13 +10,13 @@ set -e
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
clean_up() {
|
||||
find . -iname "test-kernel-config*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
find . -iname "test-kernel-config*" -not -iname "*.yml" -exec rm -rf {} \; || true
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
moby build -output kernel+initrd test-kernel-config.yml
|
||||
RESULT="$(linuxkit run qemu -kernel test-kernel-config)"
|
||||
RESULT="$(linuxkit run test-kernel-config)"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
exit 0
|
||||
|
@@ -10,13 +10,13 @@ set -e
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
clean_up() {
|
||||
find . -iname "test-kernel-config*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
find . -iname "test-kernel-config*" -not -iname "*.yml" -exec rm -rf {} \; || true
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
moby build -output kernel+initrd test-kernel-config.yml
|
||||
RESULT="$(linuxkit run qemu test-kernel-config)"
|
||||
RESULT="$(linuxkit run test-kernel-config)"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
exit 0
|
||||
|
@@ -10,13 +10,13 @@ set -e
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
clean_up() {
|
||||
find . -iname "test-kernel-config*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
find . -iname "test-kernel-config*" -not -iname "*.yml" -exec rm -rf {} \; || true
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
moby build -output kernel+initrd test-kernel-config.yml
|
||||
RESULT="$(linuxkit run qemu test-kernel-config)"
|
||||
RESULT="$(linuxkit run test-kernel-config)"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
exit 0
|
||||
|
@@ -13,7 +13,7 @@ IMAGE_NAME="kmod-test"
|
||||
|
||||
clean_up() {
|
||||
docker rmi ${IMAGE_NAME} || true
|
||||
find . -iname "kmod*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
find . -iname "kmod*" -not -iname "*.yml" -exec rm -rf {} \; || true
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
@@ -21,7 +21,10 @@ trap clean_up EXIT
|
||||
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)
|
||||
|
||||
# Build and run a LinuxKit image with kernel module (and test script)
|
||||
moby build -output kernel+initrd kmod.yml
|
||||
# Run it
|
||||
linuxkit run qemu kmod | grep -q "Hello LinuxKit"
|
||||
RESULT="$(linuxkit run kmod)"
|
||||
echo "${RESULT}" | grep -q "Hello LinuxKit"
|
||||
|
||||
exit 0
|
||||
|
@@ -4,20 +4,19 @@
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
set -v
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
clean_up() {
|
||||
find . -iname "test-binfmt*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
find . -iname "test-binfmt*" -not -iname "*.yml" -exec rm -rf {} \; || true
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
moby build -output kernel+initrd test-binfmt.yml
|
||||
RESULT="$(linuxkit run qemu -kernel test-binfmt)"
|
||||
RESULT="$(linuxkit run test-binfmt)"
|
||||
echo "${RESULT}"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
|
@@ -4,20 +4,19 @@
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
set -v
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
clean_up() {
|
||||
find . -iname "test-ca-certificates*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
find . -iname "test-ca-certificates*" -not -iname "*.yml" -exec rm -rf {} \; || true
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
moby build -output kernel+initrd test-ca-certificates.yml
|
||||
RESULT="$(linuxkit run qemu -kernel test-ca-certificates)"
|
||||
RESULT="$(linuxkit run test-ca-certificates)"
|
||||
echo "${RESULT}"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
|
@@ -4,20 +4,19 @@
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
set -v
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
clean_up() {
|
||||
find . -iname "test-dhcpcd*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
find . -iname "test-dhcpcd*" -not -iname "*.yml" -exec rm -rf {} \; || true
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
moby build -output kernel+initrd test-dhcpcd.yml
|
||||
RESULT="$(linuxkit run qemu -kernel test-dhcpcd)"
|
||||
RESULT="$(linuxkit run test-dhcpcd)"
|
||||
echo "${RESULT}"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
|
@@ -4,20 +4,19 @@
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
set -v
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
clean_up() {
|
||||
find . -iname "test-sysctl*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
find . -iname "test-sysctl*" -not -iname "*.yml" -exec rm -rf {} \; || true
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
moby build -output kernel+initrd test-sysctl.yml
|
||||
RESULT="$(linuxkit run qemu -kernel test-sysctl)"
|
||||
RESULT="$(linuxkit run test-sysctl)"
|
||||
echo "${RESULT}"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
|
Reference in New Issue
Block a user