From e10b679c2e65abccb8c7e908925d4ab6acb96b62 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Fri, 15 Nov 2024 16:27:48 -0800 Subject: [PATCH] tests: Fix the repos used for the test Use a limited set of repos to prevent problems like conflicting system-release packages. Related: RHEL-67586 --- tests/scripts/run_tests.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh index 5e130a3..8106eaf 100755 --- a/tests/scripts/run_tests.sh +++ b/tests/scripts/run_tests.sh @@ -6,11 +6,16 @@ if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then 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 {} " \;) +# NOTE: This must be able to run both on the Zuul using centos repos and on osci gating using rhel +# so filter for the list of allowed repos +REPODIR="/etc/yum.repos.d" +REPOFILES="rhel.repo centos.repo test-artifacts.repo" +REPOS="" +for r in $REPOFILES; do + [ -e "$REPODIR/$r" ] && REPOS+="--repo $REPODIR/$r " +done if [ -z "$REPOS" ]; then - echo "No system repos found" + echo "No repos ($REPOFILES) found in $REPODIR" exit 1 fi