[Cdash] ctest, valgrind and cdash

David Cole david.cole at kitware.com
Fri Jan 29 19:02:28 UTC 2010


Try CMake/CTest version 2.8.0 -- I think the segfault part of this has been
fixed since 2.6.3...


On Fri, Jan 29, 2010 at 9:49 AM, girish hilage <girish_hilage at yahoo.com>wrote:

> Hi,
>
>    The 'ctest' version I am using is "ctest version 2.6-patch 3"
>    The files of my sample project and their contents are as follows :
>
>    [girish at ps0485 CTEST]$ ls
>    CMakeLists.txt  CTestConfig.cmake  ctestrun.ctest  test.cpp
>    test.cpp : is a simple c++ program.
>
>    Contents of CMakeLists.txt :
>
>    cmake_minimum_required (VERSION 2.6)
>    ADD_EXECUTABLE (a.out test.cpp)
>    ENABLE_TESTING ()
>    INCLUDE(CTest)
>    ADD_TEST (a.out /home/girish/CTEST/a.out)
>
>    Contents of CTestConfig.cmake :
>    set(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)
>
>    Contents of ctestrun.ctest :
>    #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")
>    SET(CTEST_SOURCE_DIRECTORY "$ENV{HOME}/CTEST/")
>    SET(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/")
>    SET(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
>    SET(CTEST_BUILD_COMMAND     "/usr/bin/make")
>
>    CTEST_START("Experimental")
>    CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}")
>    CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
>    CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")
>    CTEST_SUBMIT()
>
>    I am giving commands in the following sequence :
>    * cmake .
>    * make
>    * ctest -S ctestrun.ctest
>    Output of this last command is :
>    Error(s) when updating the project
>    Error when uploading file:
> /home/girish/CTEST/Testing/20100129-1229/Build.xml
>    Error message was: couldn't connect to host
>    Problems when submitting via HTTP
>
>    I tried to check with 'netstat -atn' and shows me below line :
>    (tcp        0      1 10.88.88.143:34869          66.194.253.26:80
> SYN_SENT)
>
>    If I uncomment first 3 lines in ctestrun.ctest and give this command
> then it gives me Segmentation fault.
>    * ctest -S ctestrun.ctest      <----- Segmentation fault.
>
>    Can you please let me know,
>    * why its not able to connect to HTTP port of my.cdash.org?
>    * why its crashing when I uncomment lines related to 'valgrind'?
>
>
> 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, 3:24 PM
>
>
> girish hilage wrote:
> > Hi Bill,
> >     Thanks for your reply.
> >    I tried this. But 'ctest' gave me a Segmentation Fault.
> >    The backtrace is as follows :
> >
>
> What version of ctest?
>
> Also, exactly what input did you give to ctest?  My example was not
> complete.  Here is a more complete example:
>
> SET(CTEST_SOURCE_DIRECTORY "$ENV{HOME}/My
> Builds/CMake/Tests/Tutorial/Step7")
> SET(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}-build2")
> SET(CTEST_CMAKE_GENERATOR "Visual Studio 8 2005")
> CTEST_START("Experimental")
> CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}")
> CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
> CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")
> CTEST_SUBMIT()
>
>
> > (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<http://us.mc576.mail.yahoo.com/mc/compose?to=bill.hoffman@kitware.com>>/*
> wrote:
> >
> >
> >     From: Bill Hoffman <bill.hoffman at kitware.com<http://us.mc576.mail.yahoo.com/mc/compose?to=bill.hoffman@kitware.com>
> >
> >     Subject: Re: [Cdash] ctest, valgrind and cdash
> >     To: "girish hilage" <girish_hilage at yahoo.com<http://us.mc576.mail.yahoo.com/mc/compose?to=girish_hilage@yahoo.com>
> >
> >     Cc: cdash at public.kitware.com<http://us.mc576.mail.yahoo.com/mc/compose?to=cdash@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://us.mc576.mail.yahoo.com/mc/compose?to=Cdash@public.kitware.com>
> >     <
> http://us.mc576.mail.yahoo.com/mc/compose?to=Cdash@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://us.mc576.mail.yahoo.com/mc/compose?to=bill.hoffman@kitware.com>
> >     <
> http://us.mc576.mail.yahoo.com/mc/compose?to=bill.hoffman@kitware.com>
> >     http://www.kitware.com <http://www.kitware.com/>
> >     518 881-4905 (Direct)
> >     518 371-3971 x105
> >     Fax (518) 371-4573
> >
> >
>
>
> -- Bill Hoffman
> Kitware, Inc.
> 28 Corporate Drive
> Clifton Park, NY 12065
> bill.hoffman at kitware.com<http://us.mc576.mail.yahoo.com/mc/compose?to=bill.hoffman@kitware.com>
> http://www.kitware.com
> 518 881-4905 (Direct)
> 518 371-3971 x105
> Fax (518) 371-4573
>
>
>
> _______________________________________________
> Cdash mailing list
> Cdash at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/cdash
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cdash/attachments/20100129/dc8d9b8a/attachment-0003.htm>


More information about the CDash mailing list