Hello community, here is the log from the commit of package grep for openSUSE:Factory checked in at 2014-04-06 09:53:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grep (Old) and /work/SRC/openSUSE:Factory/.grep.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grep" Changes: -------- --- /work/SRC/openSUSE:Factory/grep/grep.changes 2014-02-24 06:52:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.grep.new/grep.changes 2014-04-06 09:53:58.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Mar 25 15:10:02 UTC 2014 - sch...@suse.de + +- mb-non-UTF8-performance.patch: make performance-measuring less + system-sensitive + +------------------------------------------------------------------- New: ---- mb-non-UTF8-performance.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grep.spec ++++++ --- /var/tmp/diff_new_pack.cKXVSK/_old 2014-04-06 09:53:59.000000000 +0200 +++ /var/tmp/diff_new_pack.cKXVSK/_new 2014-04-06 09:53:59.000000000 +0200 @@ -26,6 +26,8 @@ Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source2: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig Source3: http://savannah.gnu.org/project/memberlist-gpgkeys.php?group=grep&download=1#/%{name}.keyring +# PATCH-FIX-UPSTREAM http://git.savannah.gnu.org/cgit/grep.git/commit/?id=6e3ea0dd74426fd394225d3f9dc132e40cd92fd2 +Patch0: mb-non-UTF8-performance.patch BuildRequires: makeinfo BuildRequires: pcre-devel @@ -45,6 +47,7 @@ %prep %setup -q +%patch0 -p1 %if 0%{?suse_version} < 1120 echo "ac_cv_search_pcre_compile=\${ac_cv_search_pcre_compile=%{_libdir}/libpcre.a}" >config.cache %endif ++++++ mb-non-UTF8-performance.patch ++++++ Index: grep-2.18/tests/init.cfg =================================================================== --- grep-2.18.orig/tests/init.cfg +++ grep-2.18/tests/init.cfg @@ -103,6 +103,21 @@ require_unibyte_locale() skip_ 'no unibyte locale found' } +# Define hi_res_time_ to a function that prints the current time +# as a floating point number with greater than 1-second resolution. +# Otherwise, skip the requiring test. +require_hi_res_time_() +{ + local cmd + for cmd in 'date +%s.%N' \ + 'perl -le "use Time::HiRes qw(time); print scalar time()"'; do + case $($cmd) in + *.[0-9]*) eval 'hi_res_time_() { '"$cmd"'; }'; break;; + esac + done + type hi_res_time_ || skip_ no high-resolution timer support +} + require_JP_EUC_locale_() { local locale=ja_JP.eucJP Index: grep-2.18/tests/mb-non-UTF8-performance =================================================================== --- grep-2.18.orig/tests/mb-non-UTF8-performance +++ grep-2.18/tests/mb-non-UTF8-performance @@ -1,5 +1,7 @@ #!/bin/sh # grep-2.17 would take nearly 200x longer to run the command below. +# The 200x is on an Intel i7-based system. +# On an AMD FX-4100, it would take up to 2500x longer. # Copyright 2014 Free Software Foundation, Inc. @@ -18,15 +20,26 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src require_timeout_ +require_hi_res_time_ fail=0 -require_JP_EUC_locale_ - yes $(printf '%078d' 0) | head -50000 > in || framework_failure_ +start=$(hi_res_time_) +LC_ALL=C grep -i foobar in; st=$? +stop=$(hi_res_time_) + +# Use a multiple of the LC_ALL=C duration as the timeout for the JP/EUC test. +# A multiple of 3 seems to be enough for i5,i7, but AMD needs >25. +timeout=$($AWK 'BEGIN { print 50 * ('$stop' - '$start')}' < /dev/null) + +test $st = 1 || fail=1 + +require_JP_EUC_locale_ + # Expect no match, i.e., exit status of 1. Anything else is an error. -timeout 4 grep -i foobar in; st=$? +timeout $timeout grep -i foobar in; st=$? test $st = 1 || fail=1 Exit $fail -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org