Blame tests/z_repoclosure/repoclosure_test.sh

Athmane Madjoudj 5d4771
#!/bin/sh
Athmane Madjoudj 5d4771
# Author: Athmane Madjoudj <athmanem@gmail.com>
Athmane Madjoudj 5d4771
Athmane Madjoudj 5d4771
t_Log "Running $0 -  repoclosure test ."
Athmane Madjoudj 5d4771
303065
if [ "$centos_ver" -ge 8 ] ; then
303065
    t_Log "Skip this test in versions greater than 8, because repoclosure doesn't work with modules enabled"
303065
elif [ $SKIP_QA_HARNESS -eq 1 ] && [ "$PRE_UPDATES" != "1" ] ; then
Athmane Madjoudj db9097
    t_Log "Skip this test in non QA harness environment"
Athmane Madjoudj db9097
else
Athmane Madjoudj 5d4771
Athmane Madjoudj 8de2ed
    t_InstallPackage yum-utils
Athmane Madjoudj 3abaf8
Athmane Madjoudj 8de2ed
    t_Log "Running repoclosure test ..."
Athmane Madjoudj 8de2ed
Athmane Madjoudj 8de2ed
    repoclosure > /tmp/repoclosure.log 2>&1
Athmane Madjoudj 8de2ed
    grep -q 'unresolved deps' /tmp/repoclosure.log
Athmane Madjoudj 8de2ed
    if [ $? -eq 0 ] ; then
Athmane Madjoudj 8de2ed
        ret_val=1
Athmane Madjoudj 8de2ed
    else
Athmane Madjoudj 8de2ed
        ret_val=0
Athmane Madjoudj 8de2ed
    fi
Athmane Madjoudj 5d4771
Athmane Madjoudj 8de2ed
    # print the output of repoclosure when it fails
Athmane Madjoudj 8de2ed
    [ $ret_val -eq 1 ] && cat /tmp/repoclosure.log
Athmane Madjoudj 5d4771
Athmane Madjoudj 8de2ed
    t_CheckExitStatus $ret_val
Athmane Madjoudj 8de2ed
fi