hydra-users
[Top][All Lists]
Advanced

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

Re: customizing coverage


From: Thien-Thi Nguyen
Subject: Re: customizing coverage
Date: Fri, 20 Jan 2012 06:35:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

() address@hidden (Ludovic Courtès)
() Thu, 19 Jan 2012 23:30:55 +0100

   Thien-Thi Nguyen <address@hidden> skribis:

   > () address@hidden (Ludovic Courtès)
   > () Thu, 19 Jan 2012 17:43:23 +0100
   >
   >           coverage = pkgs: {
   >             buildInputs = [pkgs.ed];
   >    +        CPPFLAGS = "-DUSE_NORMAL_EXIT";
   >             inherit configureFlags;
   >           };
   >
   >
   > Wonderful!  Thanks.

   What this does concretely is declare a ‘CPPFLAGS’ environment
   variable, which is normally honored by both ‘configure’ and the
   makefiles (so you should see -DUSE_NORMAL_EXIT twice.)

Yeah, that's what i figured.  This assumes GCC, which is fine for
hydra, but for wider testing (later), i have added support for
‘configure --enable-coverage’, which arranges to define that
symbol only once (for RCS programs, not for configure programs)
and adds ‘--coverage’ to ‘CFLAGS’, but only if configure detects
the compiler to be GCC:

http://git.savannah.gnu.org/cgit/rcs.git/commit/?id=63759f08ef

This raises two followup questions:

- Can i use the following in rcs/release.nix?
  (I.e., will it interfere badly w/ hydra machinery?)

   rcs/release.nix |    2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)
  
  diff --git a/rcs/release.nix b/rcs/release.nix
  index c8d2237..b63e318 100644
  --- a/rcs/release.nix
  +++ b/rcs/release.nix
  @@ -70,7 +70,7 @@ in
   
         coverage = pkgs: {
           buildInputs = [pkgs.ed];
  -        inherit configureFlags;
  +        configureFlags = meta.configureFlags + " --enable-coverage";
         };
   
       };

- If so, is that syntax correct?  Is there a better way to append?



reply via email to

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