bug#25335: automake - dejagnu RUNTESTDEFAULTFLAGS overrides AM_RUNTESTFLAGS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#25335: automake - dejagnu RUNTESTDEFAULTFLAGS overrides AM_RUNTESTFLAGS

Carnë Draug
There are 3 variables used by automake when calling dejagnu's
runtest:

  $RUNTESTDEFAULTFLAGS - default from automake
  $AM_RUNTESTFLAGS - set by package developer
  $RUNTESTFLAGS - for user configuration

However, AM_RUNTESTFLAGS is used first and is therefore overwritten
by RUNTESTDEFAULTFLAGS.  My use case is that I am not using recursive
make and therefore want to set dejagnu's srcdir to the testsuite
directory.  But RUNTESTDEFAULTFLAGS then sets it to $srcdir. Here's
the lines causing my issue:

RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
[...]
        if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS)
$(RUNTESTFLAGS); \
[...]

A possible fix is to swap their order (simple patch attached).

Another issue I am having with this is that the recipe to create the
site.exp file, also built by automake, sets dejagnu's srcdir to the
Makefile $srcdir again.  I am unsure how best to fix that (I guess a
maintainer variable).

Carnë



Reply | Threaded
Open this post in threaded view
|

bug#25335: automake - dejagnu RUNTESTDEFAULTFLAGS overrides AM_RUNTESTFLAGS

Carnë Draug
> [...]
>
> A possible fix is to swap their order (simple patch attached).
> [...]

Seems like I forgot to actually attach the patch.  Here it is.

0001-dejagnu.am-AM_RUNTESTFLAGS-before-RUNTESTDEFAULTFLAG.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#25335: automake - dejagnu RUNTESTDEFAULTFLAGS overrides AM_RUNTESTFLAGS

Mathieu Lirzin
In reply to this post by Carnë Draug
Hello,

Carnë Draug <[hidden email]> writes:

> There are 3 variables used by automake when calling dejagnu's
> runtest:
>
>   $RUNTESTDEFAULTFLAGS - default from automake
>   $AM_RUNTESTFLAGS - set by package developer
>   $RUNTESTFLAGS - for user configuration
>
> However, AM_RUNTESTFLAGS is used first and is therefore overwritten
> by RUNTESTDEFAULTFLAGS.  My use case is that I am not using recursive
> make and therefore want to set dejagnu's srcdir to the testsuite
> directory.  But RUNTESTDEFAULTFLAGS then sets it to $srcdir. Here's
> the lines causing my issue:
>
> RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
> [...]
>         if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS)
> $(RUNTESTFLAGS); \
> [...]
>
> A possible fix is to swap their order (simple patch attached).

It seems like the right thing to do.  This has been fixed by commit
3126fa4c6b69c043e20af9381563069c0f2a0ba0

> Another issue I am having with this is that the recipe to create the
> site.exp file, also built by automake, sets dejagnu's srcdir to the
> Makefile $srcdir again.  I am unsure how best to fix that (I guess a
> maintainer variable).

I am not sure to understand the issue correctly.  Can you try to explain
it again?  I have no experience with DejaGNU, so don't hesitate to be
explicit.

Thanks for the bug report.

--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37