lorax-templates-rhel/tests/scripts/run_tests.sh
Brian C. Lane e94d3b0ad7 tests: Do not use fedora.repo for the test build
The tmt systems have a fedora.repo present which is including packages
that are not built for RHEL10 and can cause the test build to fail.

Resolves: RHEL-40021
2024-06-04 19:01:34 +00:00

20 lines
675 B
Bash
Executable File

#!/bin/bash
set -eux
if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then
echo "Failed to find lorax-templates-rhel templates in /usr/share/lorax/templates.d/"
exit 1
fi
# Gather up the list of system repo files and use them for lorax
# Skip fedora.repo
REPOS=$(find /etc/yum.repos.d/ -maxdepth 1 -type f -name '*\.repo' ! -name 'fedora.repo' -exec echo -n "--repo {} " \;)
if [ -z "$REPOS" ]; then
echo "No system repos found"
exit 1
fi
# Run lorax using the host's repository configuration file
lorax --product="Red Hat Enterprise Linux" --version=10 --release=10 --volid="RHEL-10-test" \
$REPOS --isfinal --nomacboot /var/tmp/lorax-rhel10-iso/