Blame thirdparty/lzo/2.03/util/check.sh
|
kusano |
7d535a |
#! /bin/sh
|
|
kusano |
7d535a |
set -e
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# usage: util/check.sh [directory]
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# This script runs lzotest with all algorithms on a complete directory tree.
|
|
kusano |
7d535a |
# It is not suitable for accurate timings.
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
# Copyright (C) 1996-2008 Markus Franz Xaver Johannes Oberhumer
|
|
kusano |
7d535a |
#
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
LZOTEST="lzotest"
|
|
kusano |
7d535a |
test -x ./lzotest/lzotest && LZOTEST="./lzotest/lzotest"
|
|
kusano |
7d535a |
test -x ./lzotest.exe && LZOTEST="./lzotest.exe"
|
|
kusano |
7d535a |
test -x ./lzotest.out && LZOTEST="./lzotest.out"
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
dir="${*-.}"
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TMPFILE="/tmp/lzo_$$.tmp"
|
|
kusano |
7d535a |
rm -f $TMPFILE
|
|
kusano |
7d535a |
(find $dir/ -type f -print > $TMPFILE) || true
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
## methods=`$LZOTEST -m | sed -n 's/^ *-m\([0-9]*\).*/\1/p'`
|
|
kusano |
7d535a |
## methods="9721 9722 9723 9724 9725 9726 9727 9728 9729"
|
|
kusano |
7d535a |
methods="21 31 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 61 71 81"
|
|
kusano |
7d535a |
methods="$methods 111 112 115"
|
|
kusano |
7d535a |
methods="$methods 921 931 901 911"
|
|
kusano |
7d535a |
methods="$methods 902 912 942 962 972 982 992"
|
|
kusano |
7d535a |
##methods="71 972"
|
|
kusano |
7d535a |
##methods="1101 1102 1103 1104 1105 1106 1107"
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
LFLAGS="-q -T -n2 -S"
|
|
kusano |
7d535a |
LFLAGS="-q -T -n2"
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
for i in $methods; do
|
|
kusano |
7d535a |
cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS
|
|
kusano |
7d535a |
done
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
rm -f $TMPFILE
|
|
kusano |
7d535a |
echo "Done."
|
|
kusano |
7d535a |
exit 0
|
|
kusano |
7d535a |
|