You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
QA/tests/p_gzip/10-C5-test-binaries

49 lines
1.1 KiB

#!/bin/bash
# Author: Iain Douglas <centos@1n6.org.uk>
#
# Check the binaries from the CentOS 5 package exist and run ok
function ExitFail {
t_Log "Fail"
exit $FAIL
}
[ $centos_ver != '5' ] && exit
# Some ov the binaries respond to a --version and some don't. Of those that
# don't, some exit with a status of 1 and others exit with a status of 2
# nice and consistent NOT!
t_Log "Running $0 - Checking binaries are present and run on C5"
[ "$(readlink -e /usr/bin/gunzip)" == "/bin/gunzip" ] || ExitFail
[ "$(readlink -e /usr/bin/gzip)" == "/bin/gzip" ] || ExitFail
for binary in gunzip gzip zcat gzexe zless
do
echo -n "$binary "
$binary --version &>/dev/null || ExitFail
done
#disabled, needs to be looked into
#for binary in zmore
#do
# echo -n "$binary "
# $binary &>/dev/null || ExitFail
#done
for binary in znew zforce
do
echo -n "$binary "
$binary &>/dev/null
[ $? != '1' ] && ExitFail
done
for binary in zgrep zfgrep zegrep zdiff zcmp
do
echo -n "$binary "
$binary &>/dev/null
[ $? != '2' ] && ExitFail
done
echo ""
t_Log "PASS"