From f937f1380b3a5f8bd964dd07a57b47bee8f088a9 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Mon, 21 Nov 2022 15:31:00 -0700 Subject: [PATCH] EPEL should not be on for func tests --- func/common/imports.sh | 6 ++++++ func/runtests.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/func/common/imports.sh b/func/common/imports.sh index c61ccf7..f8e99f9 100644 --- a/func/common/imports.sh +++ b/func/common/imports.sh @@ -41,6 +41,11 @@ function r_processor() { return 0 } +function r_checkEPELEnabled() { + /usr/bin/dnf repolist | grep -q '^epel' + return $? +} + ################################################################################ # Functions that deal with (p)ackages @@ -210,6 +215,7 @@ export rl_arch export -f r_log export -f r_checkExitStatus export -f r_processor +export -f r_checkEPELEnabled export -f p_installPackageNormal export -f p_installPackageNoWeaks export -f p_removePackage diff --git a/func/runtests.sh b/func/runtests.sh index cb7f4dd..552f108 100644 --- a/func/runtests.sh +++ b/func/runtests.sh @@ -30,6 +30,12 @@ if [ "$SELINUX" != "Enforcing" ]; then exit 1 fi +is_epel=$(r_checkEPELEnabled) +if [ "$is_epel" -ne 0 ]; then + r_log "internal" "EPEL enabled. Stop." + exit 1 +fi + r_log "internal" "Starting Release Engineering Core Tests" ################################################################################