[Cmake] Re: Tests with CMake

Bill Hoffman bill.hoffman at kitware.com
Tue Aug 14 13:17:27 EDT 2001


That is part of Dart: http://public.kitware.com/Dart/
It creates CMakeTestfile.txt in each directory.   These files
are then parsed by Dart to run the tests and produce a dashboard.

However, it would be nice to be able to run tests without Dart.
I think that this would work:

1. Create a program that is built with cmake, call cmakeRunTests.
cmakeRunTests would read the CMakeTestfile.txt in the directory it is run
in, and all sub directories specified in the CMakeTestfile.txt.  
It would run each test found with the correct arguments, and print out
test "name" passed or failed based on the return value from the executable.

2. Add a target RunTests into the cmUnixMakefileGenerator that would run cmakeRunTests
in the current directory.

3. For windows, a single utility project would be created that would run
cmakeRunTests from the top of the binary tree.

-Bill


At 04:52 PM 8/14/2001 +0000, you wrote:
>Hi Bill,
>I notice that there is already a cmAddTestCommand()  (ADD_TESTS(.....)).
>It speaks of a `testing subsystem', but I can't see how to invoke this.
>Putting ADD_TESTS(test test_prog) in my CMakeLists.txt doesn't seem to do
>anything.
>Any tips would be welcome.
>
>Tim
>
>--
>Tim Cootes                                  Research Fellow
>Imaging Science and Biomedical Engineering  tel   (+44) 0161 275 5146
>The University of Manchester                fax   (+44) 0161 275 5145
>Manchester M13 9PT , UK                     mailto:t.cootes at man.ac.uk
>                                            http://www.isbe.man.ac.uk/~bim





More information about the CMake mailing list