summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2018-06-12 17:34:54 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2018-06-12 17:35:01 +0900
commit46a0aa70a35939815807200bf1fa20c40eb70a8f (patch)
treefb9e6c918b2d0ab3935e96ec36bc4cc6f578cac5 /util
parenta97fbf725aa75db53756b59df6888e59b47c931d (diff)
parentcf55f4b64fc18401baba427c6d5ea4cb7b1ed094 (diff)
downloadlzo-46a0aa70a35939815807200bf1fa20c40eb70a8f.tar.gz
lzo-46a0aa70a35939815807200bf1fa20c40eb70a8f.tar.bz2
lzo-46a0aa70a35939815807200bf1fa20c40eb70a8f.zip
Merge branch 'tizen_base' into tizentizen_9.0_m2_releasetizen_8.0_m2_releasetizen_7.0_m2_releasetizen_6.5.m2_releasetizen_6.0.m2_releasetizen_5.5.m2_releasesubmit/tizen_6.5/20211028.163501submit/tizen_6.0_hotfix/20201103.115103submit/tizen_6.0_hotfix/20201102.192903submit/tizen_6.0/20201029.205503submit/tizen_5.5_wearable_hotfix/20201026.184307submit/tizen_5.5_mobile_hotfix/20201026.185107submit/tizen_5.5/20191031.000007submit/tizen_5.0/20181101.000007submit/tizen/20180615.072409submit/tizen/20180612.085133submit/tizen/20180612.084651accepted/tizen/unified/20180618.151445accepted/tizen/9.0/unified/20241030.232558accepted/tizen/8.0/unified/20231005.095211accepted/tizen/7.0/unified/hotfix/20221116.111123accepted/tizen/7.0/unified/20221110.060805accepted/tizen/6.5/unified/20211029.014748accepted/tizen/6.0/unified/hotfix/20201102.231413accepted/tizen/6.0/unified/20201030.112922accepted/tizen/5.5/unified/wearable/hotfix/20201027.101023accepted/tizen/5.5/unified/mobile/hotfix/20201027.074655accepted/tizen/5.5/unified/20191031.012511accepted/tizen/5.0/unified/20181102.031024tizen_9.0tizen_7.0_hotfixtizen_7.0tizen_6.5tizen_6.0_hotfixtizen_6.0tizen_5.5_wearable_hotfixtizen_5.5_tvtizen_5.5_mobile_hotfixtizen_5.5tizen_5.0accepted/tizen_unifiedaccepted/tizen_9.0_unifiedaccepted/tizen_8.0_unifiedaccepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unifiedaccepted/tizen_6.5_unifiedaccepted/tizen_6.0_unified_hotfixaccepted/tizen_6.0_unifiedaccepted/tizen_5.5_unified_wearable_hotfixaccepted/tizen_5.5_unified_mobile_hotfixaccepted/tizen_5.5_unifiedaccepted/tizen_5.0_unified
Change-Id: I005b25a1dcc898cbdf59ac1559529584eed017af Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'util')
-rw-r--r--util/check.sh37
-rw-r--r--util/checkasm.sh53
-rw-r--r--util/notime.pl5
-rw-r--r--util/overlap.sh28
-rw-r--r--util/shortf.pl5
-rw-r--r--util/table.pl5
-rw-r--r--util/uncompr.pl5
7 files changed, 80 insertions, 58 deletions
diff --git a/util/check.sh b/util/check.sh
index f412803..806c840 100644
--- a/util/check.sh
+++ b/util/check.sh
@@ -4,24 +4,32 @@ set -e
#
# usage: util/check.sh [directory]
#
-# This script runs lzotest with all algorithms on a complete directory tree.
+# 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
+# Copyright (C) 1996-2017 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"
+if test "X$LZOTEST" = X; then
+LZOTEST="./lzotest/lzotest"
+for d in ./lzotest .; do
+ for ext in "" .exe .out; do
+ if test -f "$d/lzotest$ext" && test -x "$d/lzotest$ext"; then
+ LZOTEST="$d/lzotest$ext"
+ break 2
+ fi
+ done
+done
+fi
-dir="${*-.}"
+dir="${1-.}"
-TMPFILE="/tmp/lzo_$$.tmp"
-rm -f $TMPFILE
-(find $dir/ -type f -print > $TMPFILE) || true
+TMPFILE="/tmp/lzotest_$$.tmp"
+rm -f "$TMPFILE"
+(find "$dir/." -type f -print | LC_ALL=C sort > "$TMPFILE") || true
-## methods=`$LZOTEST -m | sed -n 's/^ *-m\([0-9]*\).*/\1/p'`
+## 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"
@@ -33,11 +41,12 @@ methods="$methods 902 912 942 962 972 982 992"
LFLAGS="-q -T -n2 -S"
LFLAGS="-q -T -n2"
-for i in $methods; do
- cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS
+for m in $methods; do
+ cat "$TMPFILE" | "$LZOTEST" "-m$m" -@ $LFLAGS
done
-rm -f $TMPFILE
+rm -f "$TMPFILE"
echo "Done."
exit 0
+# vim:set ts=4 sw=4 et:
diff --git a/util/checkasm.sh b/util/checkasm.sh
index 4fee682..668a875 100644
--- a/util/checkasm.sh
+++ b/util/checkasm.sh
@@ -8,39 +8,48 @@ set -e
# on a complete directory tree.
# It is not suitable for accurate timings.
#
-# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
+# Copyright (C) 1996-2017 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"
-LFLAGS="-q"
+if test "X$LZOTEST" = X; then
+LZOTEST="./lzotest/lzotest"
+for d in ./lzotest .; do
+ for ext in "" .exe .out; do
+ if test -f "$d/lzotest$ext" && test -x "$d/lzotest$ext"; then
+ LZOTEST="$d/lzotest$ext"
+ break 2
+ fi
+ done
+done
+fi
-dir="${*-.}"
+dir="${1-.}"
-TMPFILE="/tmp/lzo_$$.tmp"
-rm -f $TMPFILE
-(find $dir/ -type f -print > $TMPFILE) || true
+TMPFILE="/tmp/lzotest_$$.tmp"
+rm -f "$TMPFILE"
+(find "$dir/." -type f -print | LC_ALL=C sort > "$TMPFILE") || true
+
+LFLAGS="-q"
-for i in 11; do
- cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -A
- cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -A -S
+for m in 11; do
+ cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -A
+ cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -A -S
done
-for i in 61; do
- cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -F
- cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -F -S
+for m in 61; do
+ cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -F
+ cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -F -S
done
-for i in 71 81; do
- cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -A
- cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -A -S
- cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -F
- cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -F -S
+for m in 71 81; do
+ cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -A
+ cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -A -S
+ cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -F
+ cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -F -S
done
-rm -f $TMPFILE
+rm -f "$TMPFILE"
echo "Done."
exit 0
+# vim:set ts=4 sw=4 et:
diff --git a/util/notime.pl b/util/notime.pl
index 5fa7d4d..b5be12d 100644
--- a/util/notime.pl
+++ b/util/notime.pl
@@ -1,6 +1,5 @@
#! /usr/bin/perl
-##
-## vi:ts=4
+## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
##
##---------------------------------------------------------------------------##
##
@@ -10,7 +9,7 @@
## Description:
## Remove timing values from a table created by table.pl
##
-## Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
+## Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
##
##---------------------------------------------------------------------------##
diff --git a/util/overlap.sh b/util/overlap.sh
index 8f3b16b..439844e 100644
--- a/util/overlap.sh
+++ b/util/overlap.sh
@@ -4,24 +4,32 @@ set -e
#
# usage: util/overlap.sh [directory]
#
-# This script runs the overlap example program on a complete directory tree.
+# This script runs the overlap example program
+# on a complete directory tree.
#
-# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
+# Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
#
-OVERLAP="overlap"
-test -x ./examples/overlap && OVERLAP="./examples/overlap"
-test -x ./overlap.exe && OVERLAP="./overlap.exe"
+OVERLAP="./examples/overlap"
+for d in ./examples .; do
+ for ext in "" .exe .out; do
+ if test -f "$d/overlap$ext" && test -x "$d/overlap$ext"; then
+ OVERLAP="$d/overlap$ext"
+ break 2
+ fi
+ done
+done
-dir="${*-.}"
+dir="${1-.}"
TMPFILE="/tmp/lzo_$$.tmp"
-rm -f $TMPFILE
-(find $dir/ -type f -print0 > $TMPFILE) || true
+rm -f "$TMPFILE"
+(find "$dir/." -type f -print0 | LC_ALL=C sort -z > "$TMPFILE") || true
-cat $TMPFILE | xargs -0 -r $OVERLAP
+cat "$TMPFILE" | xargs -0 -r "$OVERLAP"
-rm -f $TMPFILE
+rm -f "$TMPFILE"
echo "Done."
exit 0
+# vim:set ts=4 sw=4 et:
diff --git a/util/shortf.pl b/util/shortf.pl
index 3e447cd..500eb45 100644
--- a/util/shortf.pl
+++ b/util/shortf.pl
@@ -1,6 +1,5 @@
#! /usr/bin/perl
-##
-## vi:ts=4
+## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
##
##---------------------------------------------------------------------------##
##
@@ -10,7 +9,7 @@
## Description:
## Create short files for compression test
##
-## Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
+## Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
##
##---------------------------------------------------------------------------##
diff --git a/util/table.pl b/util/table.pl
index 8b35207..3fc977f 100644
--- a/util/table.pl
+++ b/util/table.pl
@@ -1,6 +1,5 @@
#! /usr/bin/perl
-##
-## vi:ts=4:et
+## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
##
##---------------------------------------------------------------------------##
##
@@ -10,7 +9,7 @@
## Description:
## Convert the output of the LZO lzotest program into a nice table.
##
-## Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
+## Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
##
##---------------------------------------------------------------------------##
diff --git a/util/uncompr.pl b/util/uncompr.pl
index 54ec9e0..a487ca6 100644
--- a/util/uncompr.pl
+++ b/util/uncompr.pl
@@ -1,6 +1,5 @@
#! /usr/bin/perl
-##
-## vi:ts=4
+## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
##
##---------------------------------------------------------------------------##
##
@@ -10,7 +9,7 @@
## Description:
## Create incompressible files for compression test
##
-## Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
+## Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
##
##---------------------------------------------------------------------------##