mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-10-22 06:30:57 +00:00
This adds a test suite to be executed using `linuxkit/rtf`. This is installed in the top-level Makefile The tests are written in shell script and cover the following cases: - Kernel Config is OK! - Kernel Modules can be built and loaded - QEMU can build and run kernel+initrd, iso-bios and iso-uefi - That we can build for all other supported output formats - That all of the examples in `./examples` can be built - The LTP tests can be run (if `-l slow` is provided) The virtsock and docker-bench tests were migrated but no test has been written as yet as AFAICT they are still a WIP Signed-off-by: Dave Tucker <dt@docker.com>
42 lines
779 B
Bash
42 lines
779 B
Bash
#!/bin/sh
|
|
# NAME: linuxkit
|
|
# SUMMARY: LinuxKit Regression Tests
|
|
# LABELS:
|
|
|
|
# Source libraries. Uncomment if needed/defined
|
|
# . "${RT_LIB}"
|
|
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
|
|
|
group_init() {
|
|
# Group initialisation code goes here
|
|
[ -r "${LINUXKIT_TMPDIR}" ] && rm -rf "${LINUXKIT_TMPDIR}"
|
|
mkdir "${LINUXKIT_TMPDIR}"
|
|
[ -r "${LINUXKIT_ARTIFACTS_DIR}" ] && rm -rf "${LINUXKIT_ARTIFACTS_DIR}"
|
|
mkdir "${LINUXKIT_ARTIFACTS_DIR}"
|
|
echo "export LINUXKIT_EXAMPLES_DIR=${RT_PROJECT_ROOT}/../../examples" >> "${LINUXKIT_TMPDIR}/env.sh"
|
|
return 0
|
|
}
|
|
|
|
group_deinit() {
|
|
# Group de-initialisation code goes here
|
|
return 0
|
|
}
|
|
|
|
CMD=$1
|
|
case $CMD in
|
|
init)
|
|
group_init
|
|
res=$?
|
|
;;
|
|
deinit)
|
|
group_deinit
|
|
res=$?
|
|
;;
|
|
*)
|
|
res=1
|
|
;;
|
|
esac
|
|
|
|
exit $res
|
|
|