bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

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
Athmane Madjoudj 5d4771
t_InstallPackage yum-utils
Athmane Madjoudj 5d4771
Athmane Madjoudj 5d4771
repoclosure > /tmp/repoclosure.log 2>&1
Athmane Madjoudj 5d4771
grep -q 'unresolved deps' /tmp/repoclosure.log
Athmane Madjoudj 5d4771
if [ $? -eq 0 ] ; then
Athmane Madjoudj 5d4771
    ret_val=1
Athmane Madjoudj 5d4771
else
Athmane Madjoudj 5d4771
    ret_val=0
Athmane Madjoudj 5d4771
fi
Athmane Madjoudj 5d4771
Athmane Madjoudj 5d4771
# print the output of repoclosure when it fails
Athmane Madjoudj 5d4771
[ $ret_val -eq 1 ] && tail /tmp/repoclosure.log
Athmane Madjoudj 5d4771
Athmane Madjoudj 5d4771
t_CheckExitStatus $ret_val