[CMake] Valgrind does not find tests

festner david.zanella at slf.ch
Tue Jul 31 14:30:14 EDT 2012


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.

*What I use: *
cmake: ctest version 2.8.0
ctest: ctest version 2.8.0
cDash: 2.0 (nesthorn.slf.ch) 

*
My script [startScriptValgrind.cmake]:*
# Set Information for build
SET(CTEST_SITE "olmenhorn")
SET(CTEST_BUILD_NAME "Linux_Standart_Valgrind")
SET(CTEST_BUILD_CONFIGURATION "release")

# set for the thest source and binary directories
SET(CTEST_SOURCE_DIRECTORY .)
SET(CTEST_BINARY_DIRECTORY .)

# set SVN command
SET(CTEST_SVN_COMMAND /usr/bin/svn)

# set Generator
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

#Configure valgrind
SET(CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
#SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS ) # activate this if would specivie
other then default valgrind options
#SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE) # to say, what valgrind should not
"test" ;-), filter out the false positive errors of valgrind

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

#also possible to set initial cache values for config to set that the test
are build
SET(CTEST_INITIAL_CACHE "
        BUILD_TESTING:BOOL=ON
        BUILD_TESTING_WITH_COVERAGE:BOOL=OFF    
")

ctest_start(Nightly) #Also tried NightlyMemCheck... same result :-(
ctest_update(SOURCE "${CTEST_SOURCE_DIRECORTY}")
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_memcheck(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_submit()

*ctest -D startScriptValgrind.cmake -VV :*
* Extra verbosity turned on
Reading Script:
/home/itadmin/cdash_clients/meteoio/startScriptValgrind.cmake
SetCTestConfiguration:SourceDirectory:/home/itadmin/cdash_clients/meteoio
SetCTestConfiguration:BuildDirectory:/home/itadmin/cdash_clients/meteoio
Run dashboard with model Nightly
   Source directory: .
   Build directory: .
   Reading ctest configuration file:
/home/itadmin/cdash_clients/meteoio/CTestConfig.cmake
SetCTestConfigurationFromCMakeVariable:NightlyStartTime:CTEST_NIGHTLY_START_TIMESetCTestConfiguration:NightlyStartTime:01:00:00
UTC
SetCTestConfigurationFromCMakeVariable:Site:CTEST_SITESetCTestConfiguration:Site:olmenhorn
SetCTestConfigurationFromCMakeVariable:BuildName:CTEST_BUILD_NAMESetCTestConfiguration:BuildName:Linux_Standart_Valgrind
   Site: olmenhorn
   Build name: Linux_Standart_Valgrind
Determine Nightly Start Time
   Specified time: 01:00:00 UTC
   Use Nightly tag: 20120731-0100
SetCTestConfiguration:SourceDirectory:/home/itadmin/cdash_clients/meteoio
SetCTestConfigurationFromCMakeVariable:SVNCommand:CTEST_SVN_COMMANDSetCTestConfiguration:SVNCommand:/usr/bin/svn
SetCTestConfiguration:BuildDirectory:/home/itadmin/cdash_clients/meteoio
SetCTestConfiguration:SourceDirectory:/home/itadmin/cdash_clients/meteoio
Updating the repository
   Updating the repository: /home/itadmin/cdash_clients/meteoio
   Use SVN repository type
   Old revision of repository is: 945
Determine Nightly Start Time
   Specified time: 01:00:00 UTC
   New revision of repository is: 945
   Gathering version information (one . per revision):
    
SetCTestConfiguration:BuildDirectory:/home/itadmin/cdash_clients/meteoio
SetCTestConfiguration:SourceDirectory:/home/itadmin/cdash_clients/meteoio
SetCTestConfiguration:ConfigureCommand:"/usr/bin/cmake" "-GUnix Makefiles"
"/home/itadmin/cdash_clients/meteoio"
SetCTestConfiguration:BuildDirectory:/home/itadmin/cdash_clients/meteoio
SetCTestConfiguration:SourceDirectory:/home/itadmin/cdash_clients/meteoio
Configure project
Configure with command: "/usr/bin/cmake" "-GUnix Makefiles"
"/home/itadmin/cdash_clients/meteoio"
Run command: "/usr/bin/cmake" "-GUnix Makefiles"
"/home/itadmin/cdash_clients/meteoio"
   Each . represents 1024 bytes of output
    .-- DEBUG CXXFLAGS  : -g3 -O0 -D__DEBUG -Wall -Wextra -pedantic -ansi
-- RELEASE CXXFLAGS: -g -O3 -DNDEBUG -DNOSAFECHECKS
-- Could NOT find Doxygen  (missing:  DOXYGEN_EXECUTABLE)
-- Could NOT find Doxygen  (missing:  DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/itadmin/cdash_clients/meteoio
 Size of output: 0K
Command exited with the value: 0
SetMakeCommand:/usr/bin/make -i
SetCTestConfiguration:MakeCommand:/usr/bin/make -i
SetCTestConfiguration:BuildDirectory:/home/itadmin/cdash_clients/meteoio
SetCTestConfiguration:SourceDirectory:/home/itadmin/cdash_clients/meteoio
Build project
MakeCommand:/usr/bin/make -i
Run command: "/usr/bin/make" "-i"
   Each symbol represents 1024 bytes of output.
   '!' represents an error and '*' a warning.
    .[ 76%] Built target meteoio
[ 77%] Built target a3dio
[ 78%] Built target arcio
[ 80%] Built target arpsio
[ 81%] Built target geotopio
[ 83%] Built target grassio
[ 88%] Built target gsnio
[ 90%] Built target pgmio
[ 91%] Built target smetio
[ 92%] Built target snio
[ 94%] Built target meteo_reading_int
[ 95%] Built target meteo_reading_no_int
[ 97%] Built target sun
[ 98%] Built target dem_reading
[100%] Built target 2D_interpolations
 Size of output: 0K
Command exited with the value: 0
   0 Compiler errors
   0 Compiler warnings
SetCTestConfigurationFromCMakeVariable:MemoryCheckCommand:CTEST_MEMORYCHECK_COMMANDSetCTestConfiguration:MemoryCheckCommand:/usr/bin/valgrind
SetCTestConfiguration:BuildDirectory:/home/itadmin/cdash_clients/meteoio
SetCTestConfiguration:SourceDirectory:/home/itadmin/cdash_clients/meteoio
Memory check project /home/itadmin/cdash_clients/meteoio
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
test 1
    Start 1: meteo_reading_interpol.smoke
Memory check command: /usr/bin/valgrind -q --tool=memcheck --leak-check=yes
--show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50

1: MemCheck command: /usr/bin/valgrind meteo_reading_int meteo_reading_int
meteo_reading_int meteo_reading_int meteo_reading_int meteo_reading_int
meteo_reading_int
1: Test timeout computed to be: 600
1: valgrind: meteo_reading_int: command not found
1/5 MemCheck #1: meteo_reading_interpol.smoke ......***Failed    0.02 sec
1: process test output now: meteo_reading_interpol.smoke
meteo_reading_interpol.smoke
test 2
    Start 2: meteo_reading_no_interpol.smoke
Memory check command: /usr/bin/valgrind -q --tool=memcheck --leak-check=yes
--show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50

2: 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
2: Test timeout computed to be: 600
2: valgrind: meteo_reading_no_int: command not found
2/5 MemCheck #2: meteo_reading_no_interpol.smoke ...***Failed    0.02 sec
2: process test output now: meteo_reading_no_interpol.smoke
meteo_reading_no_interpol.smoke
test 3
    Start 3: sun.smoke
Memory check command: /usr/bin/valgrind -q --tool=memcheck --leak-check=yes
--show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50

3: MemCheck command: /usr/bin/valgrind sun sun sun sun sun sun sun
3: Test timeout computed to be: 600
3: valgrind: sun: command not found
3/5 MemCheck #3: sun.smoke .........................***Failed    0.02 sec
3: process test output now: sun.smoke sun.smoke
test 4
    Start 4: dem_reading.smoke
Memory check command: /usr/bin/valgrind -q --tool=memcheck --leak-check=yes
--show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50

4: MemCheck command: /usr/bin/valgrind dem_reading dem_reading dem_reading
dem_reading dem_reading dem_reading dem_reading
4: Test timeout computed to be: 600
4: valgrind: dem_reading: command not found
4/5 MemCheck #4: dem_reading.smoke .................***Failed    0.02 sec
4: process test output now: dem_reading.smoke dem_reading.smoke
test 5
    Start 5: 2D_interpolations.smoke
Memory check command: /usr/bin/valgrind -q --tool=memcheck --leak-check=yes
--show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50

5: MemCheck command: /usr/bin/valgrind 2D_interpolations 2D_interpolations
2D_interpolations 2D_interpolations 2D_interpolations 2D_interpolations
2D_interpolations 2009-01-19T12:00
5: Test timeout computed to be: 600
5: valgrind: 2D_interpolations: command not found
5/5 MemCheck #5: 2D_interpolations.smoke ...........***Failed    0.02 sec
5: process test output now: 2D_interpolations.smoke 2D_interpolations.smoke

0% tests passed, 5 tests failed out of 5

Label Time Summary:
smoke    =   0.11 sec

Total Test time (real) =   0.12 sec

The following tests FAILED:
	  1 - meteo_reading_interpol.smoke (Failed)
	  2 - meteo_reading_no_interpol.smoke (Failed)
	  3 - sun.smoke (Failed)
	  4 - dem_reading.smoke (Failed)
	  5 - 2D_interpolations.smoke (Failed)
-- Processing memory checking output: ####
Memory checking results:
SetCTestConfiguration:DropMethod:http
SetCTestConfiguration:DropSite:nesthorn.slf.ch
SetCTestConfiguration:DropLocation:/submit.php?project=MeteoIO
SetCTestConfiguration:IsCDash:TRUE
SetCTestConfiguration:BuildDirectory:/home/itadmin/cdash_clients/meteoio
SetCTestConfiguration:SourceDirectory:/home/itadmin/cdash_clients/meteoio
Submit files (using http)
   Using HTTP submit method
   Drop site:http://nesthorn.slf.ch/submit.php?project=MeteoIO
   Upload file:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/Build.xml to
http://nesthorn.slf.ch/submit.php?project=MeteoIO&FileName=olmenhorn___Linux_Standart_Valgrind___20120731-0100-Nightly___XML___Build.xml
Size: 968
   Uploaded:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/Build.xml
   Upload file:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/Configure.xml to
http://nesthorn.slf.ch/submit.php?project=MeteoIO&FileName=olmenhorn___Linux_Standart_Valgrind___20120731-0100-Nightly___XML___Configure.xml
Size: 1399
   Uploaded:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/Configure.xml
   Upload file:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/DynamicAnalysis.xml
to
http://nesthorn.slf.ch/submit.php?project=MeteoIO&FileName=olmenhorn___Linux_Standart_Valgrind___20120731-0100-Nightly___XML___DynamicAnalysis.xml
Size: 3629
   Uploaded:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/DynamicAnalysis.xml
   Upload file:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/Test.xml to
http://nesthorn.slf.ch/submit.php?project=MeteoIO&FileName=olmenhorn___Linux_Standart_Valgrind___20120731-0100-Nightly___XML___Test.xml
Size: 176325
   Uploaded:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/Test.xml
   Upload file:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/Update.xml to
http://nesthorn.slf.ch/submit.php?project=MeteoIO&FileName=olmenhorn___Linux_Standart_Valgrind___20120731-0100-Nightly___XML___Update.xml
Size: 634
   Uploaded:
/home/itadmin/cdash_clients/meteoio/Testing/20120731-0100/Update.xml
   Submission successful


*And to controll:* which valgrind: /usr/bin/valgrind   [On a Linux 10.4
Desktop]

I think maybe I have made somewhere a realy stubid error... If anybody can
help me please and take a look at the script, if there isnt a bold error.
thanks !





--
View this message in context: http://cmake.3232098.n2.nabble.com/Valgrind-does-not-find-tests-tp7581046.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list