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 |
3abaf8 |
t_Log "Running repoclosure test ..."
|
|
Athmane Madjoudj |
3abaf8 |
|
|
Athmane Madjoudj |
5d4771 |
repoclosure > /tmp/repoclosure.log 2>&1
|
|
Christoph Galuschka |
a1503c |
deps_is=$(grep -c 'unresolved deps' /tmp/repoclosure.log)
|
|
Christoph Galuschka |
a1503c |
|
|
Christoph Galuschka |
a1503c |
# checking various distributions
|
|
Christoph Galuschka |
a1503c |
if (( t_DistCheck | grep -q 6 ) && ( t_GetArch | grep -q x86_64 ))
|
|
Christoph Galuschka |
a1503c |
then
|
|
Christoph Galuschka |
a1503c |
unresdeps=5
|
|
Christoph Galuschka |
a1503c |
fi
|
|
Christoph Galuschka |
a1503c |
if (( t_DistCheck | grep -q 6 ) && ( t_GetArch | grep -q i386 ))
|
|
Christoph Galuschka |
a1503c |
then
|
|
Christoph Galuschka |
a1503c |
unresdeps=8
|
|
Christoph Galuschka |
a1503c |
fi
|
|
Christoph Galuschka |
a1503c |
if (( t_DistCheck | grep -q 5) && ( t_GetArch | grep x86_64 ))
|
|
Christoph Galuschka |
a1503c |
then
|
|
Christoph Galuschka |
a1503c |
# 5.8 seems to contain no unresolved deps
|
|
Christoph Galuschka |
a1503c |
unresdeps=0
|
|
Christoph Galuschka |
a1503c |
fi
|
|
Christoph Galuschka |
a1503c |
if (( t_DistCheck | grep -q 5) && ( t_GetArch | grep i386 ))
|
|
Christoph Galuschka |
a1503c |
then
|
|
Christoph Galuschka |
a1503c |
# 5.8 seems to contain no unresolved deps
|
|
Christoph Galuschka |
a1503c |
unresdeps=0
|
|
Christoph Galuschka |
a1503c |
fi
|
|
Christoph Galuschka |
a1503c |
|
|
Christoph Galuschka |
a1503c |
if [ $deps_is -gt $unresdeps ] ; then
|
|
Athmane Madjoudj |
5d4771 |
ret_val=1
|
|
Athmane Madjoudj |
5d4771 |
else
|
|
Athmane Madjoudj |
5d4771 |
ret_val=0
|
|
Christoph Galuschka |
a1503c |
t_Log 'repoclosure seems to deliver the number not more than the number of unresolved deps we expect'
|
|
Athmane Madjoudj |
5d4771 |
fi
|
|
Athmane Madjoudj |
5d4771 |
|
|
Athmane Madjoudj |
5d4771 |
# print the output of repoclosure when it fails
|
|
Athmane Madjoudj |
7ddda5 |
[ $ret_val -eq 1 ] && cat /tmp/repoclosure.log
|
|
Athmane Madjoudj |
5d4771 |
|
|
Athmane Madjoudj |
5d4771 |
t_CheckExitStatus $ret_val
|