bug-mailutils
[Top][All Lists]
Advanced

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

Re: [bug-mailutils] Test suite failure in 2.9.97


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] Test suite failure in 2.9.97
Date: Fri, 08 Jun 2012 21:27:18 +0300

Jordi Mallach <address@hidden> ha escrit:

> The Debian makefile that does the build (debian/rules), does:
> export HOME=$(CURDIR)/junkhome

Ouch!

> This fixed a ftbfs in the past as the old testsuite assumed the buildd's
> user home existed, was writable and useful.

Err... Unfortunately, that's the first time I hear about it. I'd
appreciate it if you reported such cases right when you had encountered
them, as they mean actual bugs in the testsuite. 

> We can't assume all of that in the Debian autobuilders,

Yes, of course.

> which is why I set
> home to a directory that can be written by the build process. This has
> worked until this version, if I'm not mistaken.

I can't tell, because I don't know which of the tests made that
assumption.  Never mind.  Since, as you say, it regarded the old (I presume
DejaGNU-based) testsuite, I guess by now this question is no more than a
historic peculiarity.

Please apply the attached patch, remove that "export HOME" override from
your debian/rules and try to rebuild the package.  Let me know if it
works for you.

Regards,
Sergey

>From 844f7fed0547be2bf3643a7294160ea7ffd6cb69 Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <address@hidden>
Date: Fri, 8 Jun 2012 21:09:57 +0300
Subject: [PATCH] Fix bug in mh testsuite.

We cannot assume that $HOME points to existing directory.

* mh/tests/testsuite.at (MH_SETUP): Override HOME environment
variable. Use it instead of curdir.
* mh/tests/atlocal.in (remove_curdir): Likewise.
* mh/tests/mhn.at: Likewise.
---
 mh/tests/atlocal.in   |    2 +-
 mh/tests/mhn.at       |    6 +++---
 mh/tests/testsuite.at |   11 ++++++-----
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/mh/tests/atlocal.in b/mh/tests/atlocal.in
index 53b512f..282b2b8 100644
--- a/mh/tests/atlocal.in
+++ b/mh/tests/atlocal.in
@@ -4,7 +4,7 @@

 address@hidden@:@abs_top_builddir@/mh:$top_srcdir:$srcdir:$PATH
 remove_curdir() {
-       sed "s|$curdir/*||;s|  *$||" $*
+       sed "s|$HOME/*||;s|  *$||" $*
 }
 # mimeflt [FILE]
 # Filter out all variable information from a MIME message in FILE.
diff --git a/mh/tests/mhn.at b/mh/tests/mhn.at
index 4625b39..48de9c3 100644
--- a/mh/tests/mhn.at
+++ b/mh/tests/mhn.at
@@ -176,7 +176,7 @@ cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
 MUT_MBCHMOD(Mail/inbox, 700)

 mkdir out
-echo "mhn-storage: $curdir/out" >> $MH
+echo "mhn-storage: $HOME/out" >> $MH

 mhn +inbox -store 4 | remove_curdir || echo $?
 ],
@@ -212,7 +212,7 @@ mkdir out
 cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
 MUT_MBCHMOD(Mail/inbox, 700)

-echo "mhn-store-application: $curdir/out/%m%P.%s" >> $MH
+echo "mhn-store-application: $HOME/out/%m%P.%s" >> $MH
 mhn +inbox -store 4 | remove_curdir || exit $?
 ],
 [0],
@@ -262,7 +262,7 @@ echo "Current-Folder: inbox" > Mail/context
 echo "mhn-store-text: | $abs_top_srcdir/mh/tests/mhed -" >> $MH
 dnl ! Note extra quoting in the sed argument below, necessary because of
 dnl ! unbalanced parentheses.
-mhn +inbox -store -part 1 4 | sed ["s|$abs_top_srcdir/mh/tests/||;s|(cd 
\(.*\)\;|(cd home\;|;s|  *$||"] || exit $?
+mhn +inbox -store -part 1 4 | sed ["s|$abs_top_srcdir/mh/tests/||g;s|(cd 
\(.*\)\;|(cd home\;|;s|  *$||"] || exit $?
 ],
 [0],
 [-- Editor invocation: -
diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at
index d8a90ef..4c02bc8 100644
--- a/mh/tests/testsuite.at
+++ b/mh/tests/testsuite.at
@@ -18,15 +18,16 @@ m4_include([testsuite.inc])

 m4_define([MH_SETUP],[
 test -d Mail || mkdir Mail
-curdir=`pwd`
-MH=$curdir/mh_profile
+HOME=`pwd`
+export HOME
+MH=$HOME/mh_profile
 export MH
 cat > $MH <<EOT
-Path: $curdir/Mail
+Path: $HOME/Mail
 mhetcdir: $abs_top_srcdir/mh/etc
 moreproc: /bin/cat
 EOT
-MTSTAILOR=$curdir/mtstailor
+MTSTAILOR=$HOME/mtstailor
 export MTSTAILOR
 exec <&-
 ])
@@ -39,7 +40,7 @@ username: mhtester
 url: sendmail://$abs_top_builddir/examples/mta
 EOT

-MTA_DIAG=$curdir/mta.diag
+MTA_DIAG=$HOME/mta.diag
 export MTA_DIAG
 MTA_DOMAIN=example.net
 export MTA_DOMAIN
--
1.7.3.2


reply via email to

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