mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 00:37:24 +00:00
ci: Test kata on new Kernel changes.
Add testing to make sure new kernel changes does not break Kata. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
7b5d62fb74
commit
933c2031a4
15
.ci/lib.sh
15
.ci/lib.sh
@ -11,6 +11,21 @@ die(){
|
||||
exit 1
|
||||
}
|
||||
|
||||
export tests_repo="${tests_repo:-github.com/kata-containers/tests}"
|
||||
export tests_repo_dir="$GOPATH/src/$tests_repo"
|
||||
|
||||
clone_tests_repo()
|
||||
{
|
||||
# KATA_CI_NO_NETWORK is (has to be) ignored if there is
|
||||
# no existing clone.
|
||||
if [ -d "${tests_repo_dir}" ] && [ -n "${KATA_CI_NO_NETWORK:-}" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
go get -d -u "$tests_repo" || true
|
||||
}
|
||||
|
||||
install_yq() {
|
||||
GOPATH=${GOPATH:-${HOME}/go}
|
||||
local yq_path="${GOPATH}/bin/yq"
|
||||
|
@ -31,6 +31,11 @@ make_target() {
|
||||
|
||||
test-build-kernel)
|
||||
[ -n "${CI}" ] && check_kata_kernel_version
|
||||
# Setup testing script to test Kata with new kernel changes.
|
||||
[ -n "${CI}" ] && clone_tests_repo &&
|
||||
pushd "${tests_repo_dir}" &&
|
||||
.ci/setup.sh &&
|
||||
popd
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -71,7 +71,25 @@ build_kernel() {
|
||||
OK
|
||||
}
|
||||
|
||||
pushd ${tmp_dir}
|
||||
test_kata() {
|
||||
local cidir="${script_dir}/../.ci/"
|
||||
echo "test kata with new kernel config"
|
||||
[ -z "${CI:-}" ] && echo "skip: Not in CI" && return
|
||||
echo "Setup kernel source"
|
||||
${build_kernel_sh} setup
|
||||
echo "Build kernel"
|
||||
${build_kernel_sh} build
|
||||
echo "Install kernel"
|
||||
sudo -E PATH="$PATH" "${build_kernel_sh}" install
|
||||
|
||||
source "${cidir}/lib.sh"
|
||||
pushd "${tests_repo_dir:-no-defined}"
|
||||
.ci/run.sh
|
||||
popd
|
||||
}
|
||||
|
||||
pushd "${tmp_dir}"
|
||||
check_help
|
||||
build_kernel
|
||||
test_kata
|
||||
popd
|
||||
|
Loading…
Reference in New Issue
Block a user