summaryrefslogtreecommitdiff
path: root/ics-openvpn-stripped/main/lzo/util/check.sh
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-07-31 12:09:49 +0200
committerParménides GV <parmegv@sdf.org>2014-07-31 12:09:49 +0200
commit0393ba6656ce6cf679a2c4663275b3ed0f1a34b9 (patch)
treef000311e97598ab3fc42e2bea23e6cb342ad166c /ics-openvpn-stripped/main/lzo/util/check.sh
parentb28eeb08e8ec3baafdd9388cc5b70c6c84db9cf1 (diff)
Updated ics-openvpn to rev 859 + no 2nd notification.
Diffstat (limited to 'ics-openvpn-stripped/main/lzo/util/check.sh')
-rw-r--r--ics-openvpn-stripped/main/lzo/util/check.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/ics-openvpn-stripped/main/lzo/util/check.sh b/ics-openvpn-stripped/main/lzo/util/check.sh
new file mode 100644
index 00000000..f412803f
--- /dev/null
+++ b/ics-openvpn-stripped/main/lzo/util/check.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+set -e
+
+#
+# usage: util/check.sh [directory]
+#
+# This script runs lzotest with all algorithms on a complete directory tree.
+# It is not suitable for accurate timings.
+#
+# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
+#
+
+LZOTEST="lzotest"
+test -x ./lzotest/lzotest && LZOTEST="./lzotest/lzotest"
+test -x ./lzotest.exe && LZOTEST="./lzotest.exe"
+test -x ./lzotest.out && LZOTEST="./lzotest.out"
+
+dir="${*-.}"
+
+TMPFILE="/tmp/lzo_$$.tmp"
+rm -f $TMPFILE
+(find $dir/ -type f -print > $TMPFILE) || true
+
+## methods=`$LZOTEST -m | sed -n 's/^ *-m\([0-9]*\).*/\1/p'`
+## methods="9721 9722 9723 9724 9725 9726 9727 9728 9729"
+methods="21 31 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 61 71 81"
+methods="$methods 111 112 115"
+methods="$methods 921 931 901 911"
+methods="$methods 902 912 942 962 972 982 992"
+##methods="71 972"
+##methods="1101 1102 1103 1104 1105 1106 1107"
+
+LFLAGS="-q -T -n2 -S"
+LFLAGS="-q -T -n2"
+
+for i in $methods; do
+ cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS
+done
+
+rm -f $TMPFILE
+echo "Done."
+exit 0
+