bug-grep
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: clean up fedora.sh


From: Jim Meyering
Subject: Re: [PATCH] tests: clean up fedora.sh
Date: Mon, 15 Mar 2010 10:11:14 +0100

Paolo Bonzini wrote:

> On 03/14/2010 12:18 PM, Jim Meyering wrote:
>> The new fedora.sh test was annoyingly slow.
>> Yeah, 3 seconds is "slow" for some of us ;-)
>>
>> This fixes it, along with a little clean up and concurrency-protection.
>> It relies on the "timeout" program[0], but if it's not available,
>> the three sub-tests that require that are silently skipped.
>
> Good!  Can you rename it to just "fedora" so that we can have the
> convention that ".sh" implies having to convert to the new testsuite?

I've just done that, and fixed a small problem along the way:

>From 178bb9c864309b05dda33f1fc767f8c43a5f9561 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 15 Mar 2010 10:08:50 +0100
Subject: [PATCH 1/2] tests: adjust fedora.sh to handle traps more portably

* tests/fedora.sh: Use "Exit", not "exit".
---
 tests/fedora.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/fedora.sh b/tests/fedora.sh
index 2b2fe83..c022f1e 100644
--- a/tests/fedora.sh
+++ b/tests/fedora.sh
@@ -76,7 +76,7 @@ echo za a > 179698.out
 LANG=ja_JP.eucjp grep -w a 179698.out | diff - 179698.out && ok || fail

 # Skip the rest of tests in compiled without PCRE
-echo a |grep -P a >/dev/null || exit $failures
+echo a |grep -P a >/dev/null || Exit $failures

 U=https://bugzilla.redhat.com/show_bug.cgi?id=171379
 echo -n "grep -P crashes on whitespace lines: "
@@ -97,4 +97,4 @@ echo -ne "a\na" | grep -P '[^a]' >/dev/null && fail || ok
 echo -n "bad handling of line breaks with grep -P #2: "
 echo -ne "a\na" | grep -P '[^b].[^b]' >/dev/null && fail || ok

-exit $failures
+Exit $failures
--
1.7.0.2.398.g10c2f


>From f9576e961326243641bd6d23eee1b9c0a887bb34 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 15 Mar 2010 10:10:25 +0100
Subject: [PATCH 2/2] * tests/fedora.sh: Rename to...

* tests/fedora: ...this, to reflect new convention:
Use the lack of a suffix to indicate we've converted to the new
init.sh-using test framework.

tests: adjust fedora.sh to handle traps more portably
---
 tests/{fedora.sh => fedora} |    0
 1 files changed, 0 insertions(+), 0 deletions(-)
 rename tests/{fedora.sh => fedora} (100%)

diff --git a/tests/fedora.sh b/tests/fedora
similarity index 100%
rename from tests/fedora.sh
rename to tests/fedora
--
1.7.0.2.398.g10c2f




reply via email to

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