From a1503cff8d162dbc721bc33abedee6aa98c64e78 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Jul 12 2012 19:34:55 +0000 Subject: an attempt on repoclosure --- diff --git a/tests/z_repoclosure/repoclosure_test.sh b/tests/z_repoclosure/repoclosure_test.sh index d48868e..391861d 100755 --- a/tests/z_repoclosure/repoclosure_test.sh +++ b/tests/z_repoclosure/repoclosure_test.sh @@ -8,11 +8,33 @@ t_InstallPackage yum-utils t_Log "Running repoclosure test ..." repoclosure > /tmp/repoclosure.log 2>&1 -grep -q 'unresolved deps' /tmp/repoclosure.log -if [ $? -eq 0 ] ; then +deps_is=$(grep -c 'unresolved deps' /tmp/repoclosure.log) + +# checking various distributions +if (( t_DistCheck | grep -q 6 ) && ( t_GetArch | grep -q x86_64 )) + then + unresdeps=5 +fi +if (( t_DistCheck | grep -q 6 ) && ( t_GetArch | grep -q i386 )) + then + unresdeps=8 +fi +if (( t_DistCheck | grep -q 5) && ( t_GetArch | grep x86_64 )) + then + # 5.8 seems to contain no unresolved deps + unresdeps=0 +fi +if (( t_DistCheck | grep -q 5) && ( t_GetArch | grep i386 )) + then + # 5.8 seems to contain no unresolved deps + unresdeps=0 +fi + +if [ $deps_is -gt $unresdeps ] ; then ret_val=1 else ret_val=0 + t_Log 'repoclosure seems to deliver the number not more than the number of unresolved deps we expect' fi # print the output of repoclosure when it fails