diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh index 31b11c9..0f6a56d 100755 --- a/tests/scripts/run_tests.sh +++ b/tests/scripts/run_tests.sh @@ -306,9 +306,12 @@ if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then exit 1 fi -# HARD CODE the list of repos -# test systems add a bunch of unneeded repos that cause things to fail -REPOS="--repo /etc/yum.repos.d/centos.repo --repo /etc/yum.repos.d/test-artifacts.repo" +# Gather up the list of system repo files and use them for lorax +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 # The c10s tmt systems have started using $stream in the repo urls as of 6/2024, substitute # 10-stream for this variable so that they can be passed to lorax