grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v2.22-26-g20f20a4


From: Jim Meyering
Subject: grep branch, master, updated. v2.22-26-g20f20a4
Date: Tue, 12 Jan 2016 04:55:35 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  20f20a4dae4830b587fbbc5e8198bdc44b3dd3a8 (commit)
      from  69f885ed355708b6ae624682fefe42062d2c3f17 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=20f20a4dae4830b587fbbc5e8198bdc44b3dd3a8


commit 20f20a4dae4830b587fbbc5e8198bdc44b3dd3a8
Author: Jim Meyering <address@hidden>
Date:   Fri Jan 8 19:23:25 2016 -0800

    tests: do use "yes" but via an AWK replacement
    
    Also, use sed Nq in place of head -N
    * tests/init.cfg (yes): Define.
    Thanks to Paul Eggert for this definition.
    * tests/max-count-overread: Revert to using "yes".
    * tests/mb-non-UTF8-performance: Likewise, and use
    "sed Nq" in place of head -N.

diff --git a/tests/init.cfg b/tests/init.cfg
index be03357..bc62c32 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -200,3 +200,6 @@ user_time_()
     $child_user *= 1000;
     print int ($child_user + 0.5)' "$@"
 }
+
+# yes is not portable, fake it with $AWK
+yes() { line=${*-y} ${AWK-awk} 'BEGIN{for (;;) print ENVIRON["line"]}'; }
diff --git a/tests/max-count-overread b/tests/max-count-overread
index ec98ac8..d7aafd6 100755
--- a/tests/max-count-overread
+++ b/tests/max-count-overread
@@ -9,7 +9,7 @@ fail=0
 
 echo x > exp || framework_failure_
 
-${AWK-awk} 'BEGIN{for (;;) print "x"}' | timeout 3 grep -m1 x > out || fail=1
+yes x | timeout 3 grep -m1 x > out || fail=1
 compare exp out || fail=1
 
 Exit $fail
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
index c350dfb..3f9209c 100755
--- a/tests/mb-non-UTF8-performance
+++ b/tests/mb-non-UTF8-performance
@@ -31,9 +31,7 @@ expensive_
 # the unibyte test takes at least 10ms of user time.
 n_lines=100000
 while :; do
-  ${AWK-awk} -v n_lines=$n_lines \
-      'BEGIN {while (n_lines--) printf "%078d\n", 0}' </dev/null >in ||
-    framework_failure_
+  yes $(printf '%078d' 0) | sed ${n_lines}q > in || framework_failure_
   ubyte_ms=$(LC_ALL=C user_time_ 1 grep -i foobar in) || fail=1
   test $ubyte_ms -ge 10 && break
   n_lines=$(expr $n_lines + 200000)

-----------------------------------------------------------------------

Summary of changes:
 tests/init.cfg                |    3 +++
 tests/max-count-overread      |    2 +-
 tests/mb-non-UTF8-performance |    4 +---
 3 files changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]