[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Platform-testers] new snapshot available: grep-2.9.69-f91c
From: |
Jim Meyering |
Subject: |
Re: [Platform-testers] new snapshot available: grep-2.9.69-f91c |
Date: |
Sat, 12 Nov 2011 16:49:50 +0100 |
Dagobert Michelsen wrote:
> Hi Jim,
>
> Am 11.11.2011 um 14:42 schrieb Jim Meyering:
>> Thanks for investigating.
>> I've pushed the following fix to gnulib;
>> I'll update grep to use it before the release.
>
> Excellent! Please let me know if you have an updated tarball for me to try.
That fix was not enough, and even had a typo.
With these further changes, I've now confirmed that those two
tests are indeed skipped on Solaris 10, which also lacks those
definitions.
>From 24586b2eeb992e5cccc359e009ed3d1860c5eb90 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 12 Nov 2011 16:44:59 +0100
Subject: [PATCH 1/2] test-exclude: fix a typo
* tests/test-exclude.c (main): Test for "leading_dir", not "leading-dir".
---
ChangeLog | 5 +++++
tests/test-exclude.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6b67bd8..4a29566 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-12 Jim Meyering <address@hidden>
+
+ test-exclude: fix a typo
+ * tests/test-exclude.c (main): Test for "leading_dir", not
"leading-dir".
+
2011-11-11 Bruno Haible <address@hidden>
obstack: Fix compilation error on MSVC 9.
diff --git a/tests/test-exclude.c b/tests/test-exclude.c
index 47392d9..88af36a 100644
--- a/tests/test-exclude.c
+++ b/tests/test-exclude.c
@@ -107,7 +107,7 @@ main (int argc, char **argv)
/* Skip this test if invoked with -leading-dir on a system that
lacks support for FNM_LEADING_DIR. */
- if (strcmp (s, "leading-dir") == 0 && FNM_LEADING_DIR == 0)
+ if (strcmp (s, "leading_dir") == 0 && FNM_LEADING_DIR == 0)
exit (77);
/* Likewise for -casefold and FNM_CASEFOLD. */
--
1.7.8.rc0.61.g8a042
>From e500079a186434daeba99a1ea115690715fd56eb Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 12 Nov 2011 16:48:09 +0100
Subject: [PATCH 2/2] test-exclude2.sh, test-exclude5.sh: fail if test-exclude
fails
These shell scripts ignored failure of the binary test-exclude,
so making the latter return 77 didn't cause them to be skipped.
* tests/test-exclude5.sh: Exit with test-exclude's error status
when that program fails. Revamp to use init.sh.
* tests/test-exclude2.sh: Likewise.
---
ChangeLog | 7 +++++++
tests/test-exclude2.sh | 28 ++++++++++++++++++----------
tests/test-exclude5.sh | 28 ++++++++++++++++++----------
3 files changed, 43 insertions(+), 20 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4a29566..d265d75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-11-12 Jim Meyering <address@hidden>
+ test-exclude2.sh, test-exclude5.sh: fail if test-exclude fails
+ These shell scripts ignored failure of the binary test-exclude,
+ so making the latter return 77 didn't cause them to be skipped.
+ * tests/test-exclude5.sh: Exit with test-exclude's error status
+ when that program fails. Revamp to use init.sh.
+ * tests/test-exclude2.sh: Likewise.
+
test-exclude: fix a typo
* tests/test-exclude.c (main): Test for "leading_dir", not
"leading-dir".
diff --git a/tests/test-exclude2.sh b/tests/test-exclude2.sh
index 7011754..b38bb7f 100755
--- a/tests/test-exclude2.sh
+++ b/tests/test-exclude2.sh
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-TMP=excltmp.$$
-LIST=flist.$$
-ERR=0
+. "${srcdir=.}/init.sh"; path_prepend_ .
-cat > $LIST <<EOT
+fail=0
+
+cat > in <<EOT
foo*
bar
Baz
@@ -28,7 +28,7 @@ EOT
# Test case-insensitive literal matches
-cat > $TMP <<EOT
+cat > expected <<EOT
foo: 0
foo*: 1
bar: 1
@@ -37,9 +37,17 @@ baz: 1
bar/qux: 0
EOT
-./test-exclude$EXEEXT -casefold $LIST -- foo 'foo*' bar foobar baz bar/qux |
- tr -d '\015' |
- diff -c $TMP - || ERR=1
+test-exclude -casefold in -- foo 'foo*' bar foobar baz bar/qux > out \
+ || exit $?
+
+# Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
+# does not understand '\r'.
+case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac
+
+# normalize output
+LC_ALL=C tr -d "$cr" < out > k
+mv k out
+
+compare expected out || fail=1
-rm -f $TMP $LIST
-exit $ERR
+Exit $fail
diff --git a/tests/test-exclude5.sh b/tests/test-exclude5.sh
index 7f95ea7..3257963 100755
--- a/tests/test-exclude5.sh
+++ b/tests/test-exclude5.sh
@@ -16,28 +16,36 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-TMP=excltmp.$$
-LIST=flist.$$
-ERR=0
+. "${srcdir=.}/init.sh"; path_prepend_ .
+
+fail=0
# Test FNM_LEADING_DIR
-cat > $LIST <<EOT
+cat > in <<EOT
foo*
bar
Baz
EOT
-cat > $TMP <<EOT
+cat > expected <<EOT
bar: 1
bar/qux: 1
barz: 0
foo/bar: 1
EOT
-./test-exclude$EXEEXT -leading_dir $LIST -- bar bar/qux barz foo/bar |
- tr -d '\015' |
- diff -c $TMP - || ERR=1
+test-exclude -leading_dir in -- bar bar/qux barz foo/bar > out \
+ || exit $?
+
+# Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
+# does not understand '\r'.
+case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac
+
+# normalize output
+LC_ALL=C tr -d "$cr" < out > k
+mv k out
+
+compare expected out || fail=1
-rm -f $TMP $LIST
-exit $ERR
+Exit $fail
--
1.7.8.rc0.61.g8a042
- Re: [Platform-testers] new snapshot available: grep-2.9.69-f91c, Jim Meyering, 2011/11/11
- Re: [Platform-testers] new snapshot available: grep-2.9.69-f91c, Dagobert Michelsen, 2011/11/11
- Re: [Platform-testers] new snapshot available: grep-2.9.69-f91c,
Jim Meyering <=
- Re: [Platform-testers] new snapshot available: grep-2.9.69-f91c, Jim Meyering, 2011/11/12
- Re: exclude tests refactoring, Bruno Haible, 2011/11/12
- Re: exclude tests refactoring, Jim Meyering, 2011/11/12
- Re: exclude tests refactoring, Bruno Haible, 2011/11/13
- Re: exclude tests refactoring, Jim Meyering, 2011/11/13