osbuild/tests/unit-tests/prep-host-environment.sh
Tomáš Hozza 4a204b5d1f
Tests: don't install and test gdisk stage
gdisk component has been removed from c10s / el10, therefore we should
not be installing it and testing the stage.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-10-01 12:26:51 +02:00

34 lines
873 B
Bash
Executable File

#!/usr/bin/bash
# Prepare the host environment for running the osbuild unit tests.
# This includes installing missing dependencies and tools.
set -euxo pipefail
source /etc/os-release
# Move to the checked out git repo with the test plans
# this should be the root of the dist-git repo
cd "${TMT_TREE}"
# install all test dependencies
sudo dnf install -y \
rpmdevtools \
python3-mako \
python3-pip \
rpm-ostree \
dosfstools
sudo dnf builddep -y osbuild.spec
# Install pytst from pip, because the version in some RHEL / CentOS releases is too old
sudo pip3 install pytest
# Make sure that /usr/lib/systemd/boot/efi/linuxx64.efi.stub is available to enable pe32p tests
case "${ID}-${VERSION_ID}" in
rhel-8.* | centos-8)
sudo dnf install -y systemd-udev
;;
*)
sudo dnf install -y systemd-boot-unsigned
;;
esac