mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-25 10:43:15 +00:00
ci: Move tracing tests here
I'm basically moving the tracing tests from the tests repo to this one, and I'm adding the "Signed-off-by:" of every single contributor to the tests. Fixes: #8114 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com> Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com> Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com> Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com> Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com> Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
This commit is contained in:
56
tests/functional/tracing/gha-run.sh
Executable file
56
tests/functional/tracing/gha-run.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
kata_tarball_dir="${2:-kata-artifacts}"
|
||||
tracing_dir="$(dirname "$(readlink -f "$0")")"
|
||||
source "${tracing_dir}/../../common.bash"
|
||||
|
||||
function install_dependencies() {
|
||||
info "Installing the dependencies needed for running the tracing tests"
|
||||
|
||||
# Dependency list of projects that we can rely on the system packages
|
||||
# - crudini
|
||||
# - jq
|
||||
# - socat
|
||||
# - tmux
|
||||
declare -a system_deps=(
|
||||
crudini
|
||||
jq
|
||||
socat
|
||||
tmux
|
||||
)
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install "${system_deps[@]}"
|
||||
|
||||
# Install docker according to the docker's website documentation
|
||||
install_docker
|
||||
}
|
||||
|
||||
function run() {
|
||||
info "Running tracing tests using ${KATA_HYPERVISOR} hypervisor"
|
||||
|
||||
enabling_hypervisor
|
||||
bash -c ${tracing_dir}/test-agent-shutdown.sh
|
||||
bash -c ${tracing_dir}/tracing-test.sh
|
||||
}
|
||||
|
||||
function main() {
|
||||
action="${1:-}"
|
||||
case "${action}" in
|
||||
install-dependencies) install_dependencies ;;
|
||||
install-kata) install_kata ;;
|
||||
run) run ;;
|
||||
*) >&2 die "Invalid argument" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
main "$@"
|
Reference in New Issue
Block a user