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" ################################################################################