[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: update-copyright self-tests bug
From: |
Jim Meyering |
Subject: |
Re: update-copyright self-tests bug |
Date: |
Fri, 25 Nov 2011 10:06:43 +0100 |
Simon Josefsson wrote:
> This problem came up for Libidn but it seems to be a problem with the
> update-copyright self check, it fails under Cygwin.
>
>> * Cygwin 1.7.9
>>
>> Fails already in the gnulib tests:
>>
>> 1 of 36 tests failed
>>
>> --- - 2011-11-23 01:13:33.194375000 +0100
>> +++ update-copyright.test-ex-stderr 2011-11-23 01:13:33.099750000 +0100
>> @@ -1,2 +1,4 @@
>> update-copyright.test-ex.4: warning: copyright statement not found
>> +update-copyright.test-ex.4.bak: warning: copyright statement not found
>> update-copyright.test-ex.5: warning: copyright statement not found
>> +update-copyright.test-ex.5.bak: warning: copyright statement not found
>> FAIL: test-update-copyright.sh
>
> Any ideas where the *.bak files come from? I can't find anything in
Hi Simon,
It looks like somehow perl is being run with -pi.bak.
However, here's a patch that should avoid that:
>From 30985f5d260ef719efea5b666713a40d0f132f46 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 25 Nov 2011 10:03:49 +0100
Subject: [PATCH] test-update-copyright.sh: avoid false-positive failure
* tests/test-update-copyright.sh: Use $TMP.? (not $TMP.*), to work
around false positive failure on Cygwin/Windows. The latter was
matching erroneously-created files with names like
update-copyright.test-ex.4.bak. Reported by Simon Josefsson.
---
ChangeLog | 8 ++++++++
tests/test-update-copyright.sh | 6 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd82024..b57168a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-11-25 Jim Meyering <address@hidden>
+
+ test-update-copyright.sh: avoid false-positive failure
+ * tests/test-update-copyright.sh: Use $TMP.? (not $TMP.*), to work
+ around false positive failure on Cygwin/Windows. The latter was
+ matching erroneously-created files with names like
+ update-copyright.test-ex.4.bak. Reported by Simon Josefsson.
+
2011-11-24 Jim Meyering <address@hidden>
test-stdalign.c: comment out long double tests
diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh
index a1fce0b..87054ec 100755
--- a/tests/test-update-copyright.sh
+++ b/tests/test-update-copyright.sh
@@ -103,7 +103,7 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
EOF
UPDATE_COPYRIGHT_YEAR=2009 \
- update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
$TMP.4: warning: copyright statement not found
@@ -145,7 +145,7 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
EOF
UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
- update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
$TMP.4: warning: copyright statement not found
@@ -183,7 +183,7 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
EOF
UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \
- update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
$TMP.4: warning: copyright statement not found
--
1.7.8.rc3.31.g017d1
> test-update-copyright.sh that creates them, so I suspect that
> Cygwin/Windows somehow creates backup files for some reason? Is there
> any way to disable that? Any other ideas?
>
> Meanwhile, I'm disabling this self-test in Libidn since it doesn't
> affect the stability of the rest of the package. Generally, this
> self-tests seems to be in a somewhat different class than usual
> self-tests, more like a maintainer-check thing?
Yes. It is important to have self tests for programs like that,
but it's not as important that they run properly on non-development
platforms.