[Top][All Lists]

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

Re: [bug-gnulib] gnulib-tool --with-tests --test

From: Bruno Haible
Subject: Re: [bug-gnulib] gnulib-tool --with-tests --test
Date: Tue, 14 Nov 2006 10:57:08 +0100
User-agent: KMail/1.9.1

Ralf Wildenhues wrote:
> > About the gl_source_base of the tests directory: The idea is that
> > the tests directory has its sources separate from the main directory,
> > so that when a dependency (providing a .h file, for example) is missing
> > from a library module but present in the tests module, we still an
> > error while compiling the library. Otherwise testing with --with-tests
> > might fail to uncover dependency bugs that --without-tests would uncover;
> > this is obviously undesirable. - Can you find another fix for the problem?
> FWIW, I don't understand this.  The gltests/ subdirectory already shares
> as much as possible with the parent configury

Yes, I didn't explain it well.

> > Like above: If the tests module requires an m4 macro invocation that the
> > library module would also need but lacks, --with-tests would not uncover
> > the bug.
> I don't buy that either.  The macro directory is shared

You're right. What I said, was bullshit.

> For reproducing the issue, it is sufficient to run
> $ gnulib-tool --with-tests --test getloadavg
> [...]
> | checking for error_at_line... yes
> | configure: error: ./gltests/getloadavg.c is missing
> | configure: error: ./configure failed for gltests

OK, I'm applying this fix. Your patch was half right.

2006-11-13  Bruno Haible  <address@hidden>

        * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
        the tests directory.
        Reported by Ralf Wildenhues.

*** gnulib-20061108-modified/gnulib-tool        2006-11-13 03:33:49.000000000 
--- gnulib-20061108/gnulib-tool 2006-11-14 01:50:51.000000000 +0100
*** 2363,2369 ****
         echo "gl_libdeps="
         echo "gl_ltlibdeps="
-      echo "gl_source_base='$testsbase'"
       # Wrap the set of autoconf snippets into an autoconf macro that is then
       # invoked. This is needed because autoconf does not support AC_REQUIRE
       # at the top level:
--- 2363,2368 ----
*** 2387,2392 ****
--- 2386,2392 ----
       # We don't have explicit ordering constraints between the various
       # autoconf snippets. It's cleanest to put those of the library before
       # those of the tests.
+      echo "gl_source_base='../$sourcebase'"
       for module in $modules; do
         if test -n "$module"; then
*** 2394,2399 ****
--- 2394,2400 ----
             | sed -e "$sed_replace_build_aux"
+      echo "gl_source_base='.'"
       for module in $modules; do
         if test -n "$module"; then

reply via email to

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