mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 12:14:48 +00:00
tests/vfio: Move dependency installation to gha-run.sh
To match the flow of other github actions workflows. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
parent
5a551a85b1
commit
a92ddeea15
tests/functional/vfio
@ -15,6 +15,28 @@ source "${vfio_dir}/../../common.bash"
|
||||
|
||||
function install_dependencies() {
|
||||
info "Installing the dependencies needed for running the vfio tests"
|
||||
(
|
||||
source /etc/os-release || source /usr/lib/os-release
|
||||
case "${ID}" in
|
||||
ubuntu)
|
||||
# cloud image dependencies
|
||||
deps=(xorriso curl qemu-utils openssh-client)
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ${deps[@]} qemu-system-x86
|
||||
;;
|
||||
fedora)
|
||||
# cloud image dependencies
|
||||
deps=(xorriso curl qemu-img openssh)
|
||||
|
||||
sudo dnf install -y ${deps[@]} qemu-system-x86-core
|
||||
;;
|
||||
|
||||
"*")
|
||||
die "Unsupported distro: ${ID}"
|
||||
;;
|
||||
esac
|
||||
)
|
||||
}
|
||||
|
||||
function run() {
|
||||
|
@ -244,30 +244,6 @@ run_vm() {
|
||||
-device virtio-net-pci,netdev=net1,disable-legacy=on,disable-modern="${disable_modern}",iommu_platform=on,ats=on
|
||||
}
|
||||
|
||||
install_dependencies() {
|
||||
case "${ID}" in
|
||||
ubuntu)
|
||||
# cloud image dependencies
|
||||
deps=(xorriso curl qemu-utils openssh-client)
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ${deps[@]}
|
||||
sudo apt-get install --reinstall -y qemu-system-x86
|
||||
;;
|
||||
fedora)
|
||||
# cloud image dependencies
|
||||
deps=(xorriso curl qemu-img openssh)
|
||||
|
||||
sudo dnf install -y ${deps[@]} qemu-system-x86-core
|
||||
sudo dnf reinstall -y qemu-system-x86-core
|
||||
;;
|
||||
|
||||
"*")
|
||||
die "Unsupported distro: ${ID}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
ssh_vm() {
|
||||
cmd=$@
|
||||
ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -i "${ssh_key_file}" -p "${vm_port}" "${USER}@${vm_ip}" "${cmd}"
|
||||
@ -298,8 +274,6 @@ main() {
|
||||
|
||||
mkdir -p "${data_dir}"
|
||||
|
||||
install_dependencies
|
||||
|
||||
create_ssh_key
|
||||
|
||||
create_config_iso "${config_iso_file}"
|
||||
|
Loading…
Reference in New Issue
Block a user