[CMake] Simultaneous --build-and-test and CDash submission

Marcel Loose loose at astron.nl
Thu Dec 9 05:11:13 EST 2010


>>> On 9-12-2010 at 10:13, in message <mwkqnalvczcgriuirabn at oodl>,
Wojciech Migda
<wojtek.golf at interia.pl> wrote: 
> Hi,
> 
> I have unit tests configured for CDash submissions. Submissions do
work if I 
> issue in sequence TWO commands which go pretty much like this:
> 
> # configure the build system
> ${CMAKE_ROOT}${CMAKE_BINDIR}/cmake .
> # build tests
> make clean ; make
> # run tests
> ${CMAKE_ROOT}${CMAKE_BINDIR}/ctest
> 
> However, when doing that CDash shows useful results only for the test
phase 
> - build info is missing and configure info shows only 3 lines despite
removal 
> of CMakeCache.txt.
> 
> So I attepmted using the build-and-test option. I would expect this
to work:
> 
> /vob/tetra/tools/CMake/bin_linux_x86_64/ctest -D Experimental 
> --build-and-test . . --build-generator 'Unix Makefiles'
--build-makeprogram 
> `which clearmake`
> 
> but it only builds and tests --- '-D' option seems to be ignored.
> 
> I also tried this:
> 
> /vob/tetra/tools/CMake/bin_linux_x86_64/ctest --build-and-test . . 
> --build-generator 'Unix Makefiles' --build-makeprogram `which
clearmake` 
> --test-command ./test_command.sh
> 
> where test_command.sh executes 'ctest -D Experimental' but although
it 
> submission is achieved the CDash contents is the same as with the
original 
> two commands.
> 
> So my question is how to achieve CDash submission with 'scratch'
configure 
> info (just as if cmake was invoked on clean environment), build info

> (compilation warnings and such) and test results by issueing single
command ?
> 
> Thanks for help,
> 
> Wojtek

Hi Wojtek,

If I understand you correctly, then you would in fact like to run ctest
without cmake. You can do that, be you'll need some plumbing (i.e. a
small ctest-script) to get ctest going. I think you'll find
http://www.cmake.org/Wiki/CTest:Using_CTEST_and_CDASH_without_CMAKE
useful.

Hope this helps,
Marcel Loose.



More information about the CMake mailing list