Bruce Korb <bruce.k...@gmail.com> writes:

> On 10/10/13 13:50, Eric Bavier wrote:
>> I was working on packaging AutoGen for Guix (www.gnu.org/software/guix)
>> and came across a number of failing tests with `make check` (19 of 24 in
>> autoopts failed).
>
> I am now wondering how that might have happened.
> The "init_tests" function should not be run with "set -e" active.
> Failing to test the results:
>
>>  f=`\cd ${LIBGUILE_PATH}/../bin && pwd`
>>  PATH=${f}:${PATH}
>
> should just lead to a spurious ":" appended to the start of $PATH.

Actually, it looks like you are right.  Looking at the test logs some
more, the hard errors do not occur until after this.

The real problem for most of these tests seems to be the use of
"/usr/bin/tr" instead of just "tr", since tr might not be installed at
in /usr/bin.

--- a/autoopts/test/defs.in
+++ b/autoopts/test/defs.in
@@ -289,7 +289,7 @@
   test "X${Cexe}"  = "X" && Cexe="${Csrc}"
   test "X${Dnam}"  = "X" && Dnam="${testname}"
 
-  d=`echo TEST_TEST_${Dnam}_OPTS | /usr/bin/tr '[a-z]-' '[A-Z]_'`
+  d=`echo TEST_TEST_${Dnam}_OPTS | tr '[a-z]-' '[A-Z]_'`
   cc_cmd="${CC} ${CFLAGS} -D$d ${INC} -o ${Cexe} ${Csrc}.c ${LIB}"
   eval ${cc_cmd} || \
     failure cannot compile ${Csrc}.c

> The following should be a little bit more rigorous:
>
>>   f=`\cd ${LIBGUILE_PATH}/../bin 1>/dev/null && pwd` || {
>>     f=`command -v guile | sed 's@/[^/]*$@@'`
>>     test -d "$f" || die "cannot find guile exe"
>>   }
>>   case ":${PATH}:" in
>>   *":${f}:"* ) : ;;
>>   * ) PATH=${f}:${PATH} ;;
>>   esac
>
> But "errexit" should still not be set.

Which executables are actually required for the tests?  Is it just the
'guile' executable?  If that's the case, I think configure should just
declare a precious variable named GUILE.  If the builder is already
passing the --with-libguile configure flags, it wouldn't be too much
more to ask that they then set GUILE if "guile" isn't already in PATH.
The configure and tests scripts wouldn't have to worry at all about PATH
then.

>
> For now, I've not included --with-libguile-path just because of time.
> Please try the new pre-release and if you have troubles, I'll try
> to get to the "with" thing.

With the additional patch I pasted above, the prerelease works fine.
I'll try coding up the GUILE precious variable in configure, and send a
patch if that works.

-- 
Eric Bavier, Scientific Libraries, Cray Inc.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Autogen-users mailing list
Autogen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/autogen-users

Reply via email to