Hi,

Mathieu Lirzin wrote in
<https://lists.gnu.org/archive/html/bug-gnulib/2016-05/msg00029.html>:
> Hello,
> 
> Since 2011 Automake TESTS_ENVIRONMENT variable is reserved for the
> user unless the “older (and discouraged) serial test harness” is used.
> See:
> 
>   
> https://www.gnu.org/software/automake/manual/automake.html#index-AM_005fTESTS_005fENVIRONMENT
> 
> The first patch makes use of the new AM_TESTS_ENVIRONMENT
> developer-reserved variable, and the second one adds a ‘syntax-check’
> to ensure no rule to preach the good news!  ;)
> 
> Thanks,
> 
> Mathieu Lirzin (2):
>   prefer AM_TESTS_ENVIRONMENT to TESTS_ENVIRONMENT
>   maint.mk: prohibit user reserved make flags

Unfortunately, the Automake documentation [1] says:

  "for this to work portably, however, the contents of a non-empty
   AM_TESTS_ENVIRONMENT *must* be terminated by a semicolon."

and that requires changing
  TESTS_ENVIRONMENT += USE_ACL=$(USE_ACL)
to
  AM_TESTS_ENVIRONMENT += USE_ACL=$(USE_ACL); export USE_ACL;

which is unwelcome.

In practice, I've never seen a need to set AM_TESTS_ENVIRONMENT
as a user (i.e. set AM_TESTS_ENVIRONMENT before running configure).
What we do need is an integration with sanitizers (which is done
through CC and CFLAGS) and an integration with valgrind (which cannot
be done through AM_TESTS_ENVIRONMENT, which is why Gnulib has a
module 'valgrind-tests').

Bruno

[1] 
https://www.gnu.org/software/automake/manual/html_node/Testsuite-Environment-Overrides.html




Reply via email to