Blame tests/p_gzip/10-test-binaries
|
iaind |
56c8c8 |
#!/bin/bash
|
|
iaind |
56c8c8 |
# Author: Iain Douglas <centos@1n6.org.uk>
|
|
Rene Diepstraten |
85cde8 |
# Author: Rene Diepstraten <rene@renediepstraten.nl>
|
|
Christoph Galuschka |
7de304 |
# Christoph Galuschka <tigalch@tigalch.org>
|
|
iaind |
56c8c8 |
#
|
|
iaind |
56c8c8 |
# Check the binaries from the package exist and run ok
|
|
iaind |
56c8c8 |
|
|
iaind |
56c8c8 |
function ExitFail {
|
|
iaind |
56c8c8 |
t_Log "Fail"
|
|
iaind |
56c8c8 |
exit $FAIL
|
|
iaind |
56c8c8 |
}
|
|
Iain Douglas |
90f693 |
|
|
Christoph Galuschka |
7de304 |
if [ $centos_ver -lt 6 ]
|
|
Christoph Galuschka |
7de304 |
then
|
|
Christoph Galuschka |
7de304 |
exit 0
|
|
Christoph Galuschka |
7de304 |
fi
|
|
iaind |
56c8c8 |
|
|
Christoph Galuschka |
7de304 |
t_Log "Checking binaries are present and run on C6/C7"
|
|
Christoph Galuschka |
7de304 |
|
|
Christoph Galuschka |
7de304 |
if [ $centos_ver == 7 ]
|
|
Christoph Galuschka |
7de304 |
then
|
|
Christoph Galuschka |
7de304 |
[ "$(readlink -e /usr/bin/gunzip)" == "/usr/bin/gunzip" ] || ExitFail
|
|
Christoph Galuschka |
7de304 |
[ "$(readlink -e /usr/bin/gzip)" == "/usr/bin/gzip" ] || ExitFail
|
|
Christoph Galuschka |
7de304 |
elif [ $centos_ver == 6 ]
|
|
Christoph Galuschka |
7de304 |
then
|
|
Christoph Galuschka |
7de304 |
[ "$(readlink -e /bin/gunzip)" == "/bin/gunzip" ] || ExitFail
|
|
Christoph Galuschka |
7de304 |
[ "$(readlink -e /bin/gzip)" == "/bin/gzip" ] || ExitFail
|
|
Christoph Galuschka |
7de304 |
fi
|
|
iaind |
56c8c8 |
|
|
iaind |
56c8c8 |
for binary in gunzip gzip zcat gzexe zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew
|
|
iaind |
56c8c8 |
do
|
|
iaind |
56c8c8 |
echo -n "$binary "
|
|
iaind |
56c8c8 |
$binary --version &>/dev/null || ExitFail
|
|
iaind |
56c8c8 |
done
|
|
iaind |
56c8c8 |
echo ""
|
|
iaind |
56c8c8 |
t_Log "PASS"
|