Skip to content
  • Jelte Jansen's avatar
    [2349] Ignore EXPECT_DEATH when run in valgrind · 030aef19
    Jelte Jansen authored
    Valgrind complains (probably rightfully so) that memory is leaking in death-tests. This has been reported upstream, but is not addressed yet, and may not be in the near future, if at all (one response was don't use EXPECT_DEATH).
    
    So I added a checker function, *if* valgrind headers are available, that returns true if the tests are run under valgrind. Death tests are now ignored if so.
    
    Note that we should be very careful about using this; and only use it for things we are sure valgrind can't help, since it is possible to do things differently when using valgrind, which kind of defeats its purpose
    030aef19