[Cdash] ctest, valgrind and cdash

girish hilage girish_hilage at yahoo.com
Thu Jan 28 14:58:30 UTC 2010


Hi Bill,
 
   Thanks for your reply.
   I tried this. But 'ctest' gave me a Segmentation Fault.
   The backtrace is as follows :
 
(gdb) bt
#0  0x082b2115 in cmsys::SystemTools::SplitPathRootComponent(char const*, std::string*) ()
#1  0x082b2fb3 in cmsys::SystemTools::SplitPath(char const*, std::vector<std::string, std::allocator<std::string> >&, bool) ()
#2  0x082b3473 in cmsys::SystemTools::CollapseFullPath(char const*, char const*) ()
#3  0x082b3781 in cmsys::SystemTools::CollapseFullPath(char const*) ()
#4  0x08121caa in cmCTestHandlerCommand::InitialPass(std::vector<std::string, std::allocator<std::string> > const&, cmExecutionStatus&) ()
#5  0x080f1671 in cmCommand::InvokeInitialPass(std::vector<cmListFileArgument, std::allocator<cmListFileArgument> > const&, cmExecutionStatus&) ()
#6  0x08166597 in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&) ()
#7  0x0816752b in cmMakefile::ReadListFile(char const*, char const*, std::string*, bool) ()
#8  0x080ed1b7 in cmCTestScriptHandler::ReadInScript(std::string const&) ()
#9  0x080f0b11 in cmCTestScriptHandler::RunConfigurationScript(std::string const&, bool) ()
#10 0x080f0f40 in cmCTestScriptHandler::ProcessHandler() ()
#11 0x080bb096 in cmCTest::Run(std::vector<std::string, std::allocator<std::string> >&, std::string*) ()
#12 0x080ac28b in main ()
(gdb) 

Regards,
Girish

--- On Thu, 1/28/10, Bill Hoffman <bill.hoffman at kitware.com> wrote:


From: Bill Hoffman <bill.hoffman at kitware.com>
Subject: Re: [Cdash] ctest, valgrind and cdash
To: "girish hilage" <girish_hilage at yahoo.com>
Cc: cdash at public.kitware.com
Date: Thursday, January 28, 2010, 1:37 PM


You are mixing ctest scripting with cmake scripting.

The cmake file should just build and run the tests:
cmake_minimum_required (VERSION 2.6)
ENABLE_TESTING ()
INCLUDE(CTest)
ADD_TEST (a.out /home/girish/a.out)


Then in a separate file CTestConfig.cmake, this stuff:

set(PROJECT_NAME "VALG1")
set(NIGHTLY_START_TIME "00:00:00 EST")
set(DROP_METHOD "http")
set(DROP_SITE "my.cdash.org")
set(DROP_LOCATION "/submit.php?project=VALG1")
set(DROP_SITE_CDASH TRUE)


Then in yet another file:
ctestrun.ctest
# this script also needs to configure and build the project
ctest_memcheck(BUILD ${CTEST_BINARY_DIRECTORY})
set(CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "--log-file=vlogs
  --leak-check=full --xml=yes")


ctest -S ctestrun.ctest

girish hilage wrote:
> Hi,
>  I am using ctest, cdash for the first time.
> I do not have any code to build.
> I only want to run test on some executable a.out using valgrind and see the results on my.cdash.org.
>  I have created file 'CMakeLists.txt' :
> cmake_minimum_required (VERSION 2.6)
> ENABLE_TESTING ()
> set(PROJECT_NAME "VALG1")
> set(NIGHTLY_START_TIME "00:00:00 EST")
> set(DROP_METHOD "http")
> set(DROP_SITE "my.cdash.org")
> set(DROP_LOCATION "/submit.php?project=VALG1")
> set(DROP_SITE_CDASH TRUE)
> INCLUDE(CTest)
> ADD_TEST (a.out /home/girish/a.out)
>  When I run 'ctest -D Experimental', I get the following output.
>  ----- OUTPUT START -----
> [girish at ps0485 CTEST]$ ctest -D Experimental
> Site: ps0485.persistent.co.in
> Build name: Linux-c++
> Create new tag: 20100127-1055 - Experimental
> Start processing tests
> Configure project
> Each . represents 1024 bytes of output
> . Size of output: 0K
> Build project
> Each symbol represents 1024 bytes of output.
> '!' represents an error and '*' a warning.
> Size of output: 0K
> 0 Compiler errors
> 0 Compiler warnings
> Test project /home/girish/CTEST
> 1/ 1 Testing a.out Passed
> 100% tests passed, 0 tests failed out of 1
> Performing coverage
> Cannot find any coverage files. Ignoring Coverage request.
> Submit files (using http)
> Using HTTP submit method
> Drop site: http://my.cdash.org/submit.php?project=VALG1
> Uploaded: /home/girish/CTEST/Testing/20100127-1055/Build.xml
> Uploaded: /home/girish/CTEST/Testing/20100127-1055/Configure.xml
> Uploaded: /home/girish/CTEST/Testing/20100127-1055/Test.xml
> Using HTTP trigger method
> Trigger site: http://my.cdash.org/cgi-bin/Submit-Random-TestingResults.cgi
> Dart server triggered...
> Submission successful
> ----- OUTPUT END -----
>  I have created a project VALG1 on my.cdash.org.
> But, after I run the above command; I do not see any results on the page http://my.cdash.org/index.php?project=VALG1.
>  Now, if I have a CMakeLists.txt as follows :
> cmake_minimum_required (VERSION 2.6)
> ENABLE_TESTING ()
> INCLUDE(CTest)
> ADD_TEST (a.out /home/girish/a.out)
> and CTestConfig.cmake as follows :
> set(CTEST_PROJECT_NAME "VALG1")
> set(CTEST_NIGHTLY_START_TIME "15:59:00 IST")
> set(CTEST_DROP_METHOD "http")
> set(CTEST_DROP_SITE "my.cdash.org")
> set(CTEST_DROP_LOCATION "/submit.php?project=VALG1")
> set(CTEST_DROP_SITE_CDASH TRUE)
> ctest_memcheck(BUILD “${CTEST_BINARY_DIRECTORY}â€)
> set(CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
> set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "--log-file=vlogs --leak-check=full --xml=yes")
>  and if I give the command 'cmake .' then it gives me following error :
> ----- OUTPUT START -----
> .......
> .......
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> CMake Error at CTestConfig.cmake:9 (ctest_memcheck):
> Unknown CMake command "ctest_memcheck".
> Call Stack (most recent call first):
> /usr/share/cmake/Modules/CTest.cmake:50 (INCLUDE)
> CMakeLists.txt:14 (INCLUDE)
> -- Configuring incomplete, errors occurred!
> ----- OUTPUT END -----
>  So, I would like to know :
> 1. What I need to do in order to see the results on my.cdash.org?
> 2. Why is it saying Unknown CMake command "ctest_memcheck"?
> 3. How do I make 'valgrind' run on the test?
>  Regards,
> Girish
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Cdash mailing list
> Cdash at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/cdash


-- Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cdash/attachments/20100128/0599d458/attachment-0003.htm>


More information about the CDash mailing list