[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Testing automake on Cygwin 1.7
From: |
Stefano Lattarini |
Subject: |
Re: Testing automake on Cygwin 1.7 |
Date: |
Sat, 26 Nov 2011 14:56:53 +0100 |
User-agent: |
KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) |
On Saturday 26 November 2011, Peter Rosin wrote:
>
> [SNIP]
>
> Stefano Lattarini skrev 2011-11-26 00:11:
>
> > On Friday 25 November 2011, Peter Rosin wrote:
> >>
> >> So, with those two fixes, one fail left, i.e. transform2.test.
> >> It would be better with an xfail in my opinion, if that's possible to
> >> accomplish conditionally?
> >>
> > Sadly, not easily (we could extend XFAIL_TESTS at configure time if we
> > detect the above Cygwin limitation, but that's quote involved, and IMO
> > would put the logic in the wrong place, i.e., configure.ac). Maybe in
> > a next automake version we could add a new special exit status for test
> > scripts to signal "expected failure", like e.g. `77' is used to signal
> > "skipped test"? Still, that's for automake 1.11.3 at most, so I see
> > only two ways out for now:
>
> A special exit status would only be another version of skip, with no
> chance of unexpected success
>
Ouch, I didn't think about that.
> (if I read your proposal right). That's not right either.
>
You're right. Let's forget about this (BTW, starting with Automake 1.12,
we'll have built-in TAP support, as well as support for adding custom test
drivers, so the problem will be quite mitigated).
> > 1. Add the test skip I proposed to branch-1.11 only, but *remove it*
> > after the 1.11.2 release.
> > 2. Just let the test fail, and be prepared to deal with some spurious
> > reports.
> >
> > I'm 60-40 in favor of 2, since it doesn't add yet more noise to our
> > repository. WDYT?
>
> I'm also in favor of leaving it as a plain old fail. A skip is a bit too
> silent, and it's not like the bug list is flooding with reports on the
> subject...
>
Agreed.
Attached are the two patches I had promised. I'll wait 72 hours or your
ACK (whichever comes first) before pushing.
Regards,
Stefano
From ff29c8e8f6572f63dcd30d10ef3ca1f6a19f754c Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Sat, 26 Nov 2011 14:35:58 +0100
Subject: [PATCH 1/2] tests: work around a Cygwin limitation in 'txinfo21.test'
* tests/txinfo21.test: At least on Cygwin, the timestamp of a
directory might not be properly updated when a file inside it
is changed; we need to account for this behaviour. Remove a
redundant `$sleep' since we are at it.
---
ChangeLog | 9 +++++++++
tests/txinfo21.test | 32 ++++++++++++++++++++++++++++----
2 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a8e6587..65d6e88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-11-26 Stefano Lattarini <address@hidden>
+ Peter Rosin <address@hidden>
+
+ tests: work around a Cygwin limitation in 'txinfo21.test'
+ * tests/txinfo21.test: At least on Cygwin, the timestamp of a
+ directory might not be properly updated when a file inside it
+ is changed; we need to account for this behaviour. Remove a
+ redundant `$sleep' since we are at it.
+
2011-11-24 Stefano Lattarini <address@hidden>
cosmetics: typofix in comments
diff --git a/tests/txinfo21.test b/tests/txinfo21.test
index ae1d985..70e43fe 100755
--- a/tests/txinfo21.test
+++ b/tests/txinfo21.test
@@ -22,6 +22,21 @@ required='makeinfo-html tex texi2dvi'
set -e
+# At least on Cygwin, the timestamp of a directory might not be
+# properly updated when a file inside it is changed, and we need
+# to account for that in later checks.
+mkdir tmp.d
+: > tmp.f
+: > tmp.d/tmp.f
+$sleep
+touch tmp.d/tmp.f
+if is_newest tmp.d tmp.f; then
+ have_correct_dir_timestamp=yes
+else
+ have_correct_dir_timestamp=no
+fi
+rm -rf tmp.*
+
cat >>configure.in <<\EOF
AC_CONFIG_FILES([rec/Makefile])
@@ -87,19 +102,28 @@ $AUTOCONF
$MAKE
-$sleep
# Test production of split-per-node HTML.
$MAKE html
test -d main.html
test -d sub/main2.html
test -d rec/main3.html
-# Rebuilding main.html should cause its timestamp to be updated.
-is_newest main.html main.texi
+# Rebuilding main.html should cause the timestamp of the regular
+# file `main.html/index.html' to be updated.
+is_newest main.html/index.html main.texi
+# Rebuilding main.html should cause its timestamp to be updated
+# (but main.html is a directory, so be prepared to account for the
+# Cygwin limitation described above).
+if test $have_correct_dir_timestamp = yes; then
+ is_newest main.html main.texi || Exit 1
+fi
$sleep
touch main.texi
$MAKE html
-is_newest main.html main.texi
+is_newest main.html/index.html main.texi
+if test $have_correct_dir_timestamp = yes; then
+ is_newest main.html main.texi || Exit 1
+fi
$MAKE clean
test ! -d main.html
--
1.7.2.3
From 9af81ac7c3a0d037f31638525b261246bc3ac815 Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
In-Reply-To: <address@hidden>
References: <address@hidden>
From: Peter Rosin <address@hidden>
Date: Sat, 26 Nov 2011 14:54:00 +0100
Subject: [PATCH 2/2] tests: fix 'distcheck-override-infodir.test' on Cygwin
* tests/distcheck-override-infodir.test (Makefile.am): Do not add
any `/' between $(DESTDIR) and the following paths. Otherwise,
when $(DESTDIR) is empty, the recipes will try to access files
with a leading double slash, and these are interpreted specially
under Cygwin (as "network paths" or "remote shares").
---
ChangeLog | 9 +++++++++
tests/distcheck-override-infodir.test | 8 ++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 65d6e88..70e5254 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-11-26 Peter Rosin <address@hidden>
+
+ tests: fix 'distcheck-override-infodir.test' on Cygwin
+ * tests/distcheck-override-infodir.test (Makefile.am): Do not add
+ any `/' between $(DESTDIR) and the following paths. Otherwise,
+ when $(DESTDIR) is empty, the recipes will try to access files
+ with a leading double slash, and these are interpreted specially
+ under Cygwin (as "network paths" or "remote shares").
+
2011-11-26 Stefano Lattarini <address@hidden>
Peter Rosin <address@hidden>
diff --git a/tests/distcheck-override-infodir.test
b/tests/distcheck-override-infodir.test
index 19ad3d1..3cf38c5 100755
--- a/tests/distcheck-override-infodir.test
+++ b/tests/distcheck-override-infodir.test
@@ -32,11 +32,11 @@ info_TEXINFOS = main.texi
## Sanity check.
installcheck-local:
if test x$${infodir+set} != xset; then \
- ls -l "$(DESTDIR)/$(prefix)/blah/blah/foobar/" || exit 1; \
- test -f "$(DESTDIR)/$(prefix)/blah/blah/foobar/dir" || exit 1; \
+ ls -l "$(DESTDIR)$(prefix)/blah/blah/foobar/" || exit 1; \
+ test -f "$(DESTDIR)$(prefix)/blah/blah/foobar/dir" || exit 1; \
else \
- ls -l "$(DESTDIR)/$$infodir/" || exit 1; \
- test -f "$(DESTDIR)/$$infodir/dir" || exit 1; \
+ ls -l "$(DESTDIR)$$infodir/" || exit 1; \
+ test -f "$(DESTDIR)$$infodir/dir" || exit 1; \
fi
END
--
1.7.2.3
- Testing automake on Cygwin 1.7, Stefano Lattarini, 2011/11/25
- Re: Testing automake on Cygwin 1.7, Peter Rosin, 2011/11/25
- Re: Testing automake on Cygwin 1.7, Stefano Lattarini, 2011/11/25
- Re: Testing automake on Cygwin 1.7, Peter Rosin, 2011/11/26
- Re: Testing automake on Cygwin 1.7,
Stefano Lattarini <=
- Re: Testing automake on Cygwin 1.7, Stefano Lattarini, 2011/11/26
- Re: Testing automake on Cygwin 1.7, Peter Rosin, 2011/11/28
- Re: Testing automake on Cygwin 1.7, Stefano Lattarini, 2011/11/28
- Re: Testing automake on Cygwin 1.7, Peter Rosin, 2011/11/29
Re: Testing automake on Cygwin 1.7, Eric Blake, 2011/11/28