nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] new test-show tests broken

2015-02-12 08:20:57
Ken wrote:

[paul f:]
it all works very nicely, until show tries to invoke mhshow.  it
does so using nmhbindir(), which returns a hard-coded copy of the
configured install path.  if nmh has never been installed on the
machine where the test is being run (i.e., no "make install" has
happened), then show won't find /usr/local/bin/mhshow
(/usr/local/bin is the default install path), and the test-show
will fail.  or, if "make install" _has_ been done before for a
different version of nmh, the tests will run a newer local show
command along an older /usr/local/bin/mhshow, and the test may or
may not work.

I ... kind of thought we had code to deal with this for other
programs.  So there should be examples we can crib from.

The magic is in the profile used by the tests.  The patch below
fixes it for me, Paul.

David


diff --git a/test/common.sh.in b/test/common.sh.in
index dc7bc1d..b62de88 100644
--- a/test/common.sh.in
+++ b/test/common.sh.in
@@ -292,6 +292,7 @@ mhbuild: -nocontentid
 mhlproc: ${MH_LIBEXEC_DIR}/mhl
 moreproc: cat
 postproc: ${MH_LIBEXEC_DIR}/post
+showmimeproc: ${MH_INST_DIR}${bindir}/mhshow
 showproc: ${MH_LIBEXEC_DIR}/mhl
 EOF
 
diff --git a/test/mhparam/test-mhparam b/test/mhparam/test-mhparam
index 8a48b8d..91551a7 100755
--- a/test/mhparam/test-mhparam
+++ b/test/mhparam/test-mhparam
@@ -91,7 +91,7 @@ cat
 $bindir/packf
 $MH_INST_DIR$nmhlibexecdir/post
 $bindir/send
-$bindir/mhshow
+$MH_INST_DIR$bindir/mhshow
 $MH_INST_DIR$nmhlibexecdir/mhl
 nmh-`cat ${srcdir}/VERSION`
 $bindir/whatnow

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>