[CMake] Valgrind does not find tests

Andreas Mohr andi at lisas.de
Wed Aug 1 02:20:37 EDT 2012


Hi,

On Tue, Jul 31, 2012 at 02:30:16PM -0400, cmake-request at cmake.org wrote:
> Date: Tue, 31 Jul 2012 11:30:14 -0700 (PDT)
> From: festner <david.zanella at slf.ch>
> Subject: [CMake] Valgrind does not find tests
> To: cmake at cmake.org
> Message-ID: <1343759414478-7581046.post at n2.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Hello,
> 
> I have a basic Nighly script which runs our basic test and works fine. Now I
> addapted this CTest script to run the same test with MemoryCheck (Valgrind)
> but nothing is working. And I am a lidel bit lost, becouse of the -VV shows
> my :
> / "MemCheck command: /usr/bin/valgrind meteo_reading_no_int
> meteo_reading_no_int meteo_reading_no_int meteo_reading_no_int
> meteo_reading_no_int meteo_reading_no_int meteo_reading_no_int"/ 
> 
> meteo_reading_no_int is the test excecutable name.

That's very obviously a problem of the test config yielding an improper
target-name-only result rather than a FQPN to the target-built under-test binary.
AFAIR I complained about the same thing once (search for previous
posts), and at that time it turned out to be a matter of using
a wrong (outdated) signature (variant) of a certain CTest setup function.

> SET(CTEST_BUILD_NAME "Linux_Standart_Valgrind")

"Standard", *pretty please* ;)

> #set cMake command to be used
> SET(CTEST_CMAKE_COMMAND "\"${CMAKE_EXECUTABLE_NAME}\"")

Hmm, does this really need specific manual extra escaped quoting? Just
asking...

HTH,

Andreas Mohr

-- 
GNU/Linux. It's not the software that's free, it's you.


More information about the CMake mailing list