bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

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>
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
Rene Diepstraten 85cde8
[[ $centos_ver =~ ^6|7$ ]] || exit
Rene Diepstraten 85cde8
t_Log "Checking binaries are present and run on C7"
iaind 56c8c8
Rene Diepstraten 85cde8
[ "$(readlink -e /usr/bin/gunzip)" == "/usr/bin/gunzip" ] || ExitFail
Rene Diepstraten 85cde8
[ "$(readlink -e /usr/bin/gzip)" == "/usr/bin/gzip" ] || ExitFail
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"