[CMake] Distributed Testing?

Eric Noulard eric.noulard at gmail.com
Fri Mar 19 14:05:37 EDT 2010


2010/3/18 Caron, Michael C. (US SSA) <michael.caron at baesystems.com>:
> Can CMake/CTest handle testing distributed applications?  For example, I’ve
> got a Socket based server and client.  I want to test various combinations
> of server and client on the same machine, on distributed homogeneous
> machines (all win or all Linux), and on distributed heterogeneous machines
> (win and Linux for client and server).  CMake can certainly build all of the
> different flavors I need (win and Linux).  Can I use CMake or CTest to test
> the various configurations I want?

I did develop some small python library called "DTest" which helps for that
kind of thing.
see:
http://download.savannah.gnu.org/releases/tsp/dtest/what_is_dtest.pdf.

I'm using it with CMake/CTest to test distributed applications
(HLA distributed simulation) see eg:
http://www.nongnu.org/certi/certi_doc/User/html/execute.html

The idea is to build all needed executables with CMake,
then use CTest to launch a python script which may open
as many ssh connection as needed on specified machine
and run the executable. This looks like the same idea
as the Paraview "driver" but I think it could be of general use.

CTest then tests the return status of the scripts.

Example of such a script:
http://cvs.savannah.gnu.org/viewvc/applications/HLA_Tutorial/dtest_HLA_Tutorial.py?root=certi&view=markup

In my current case, each host should have the executable to launch
already deployed
but you may easily incorporate deployment inside the dtest script
since dtest is using
an SSH connection thus there are "putFile/getFile" steps which use scp
to transfer files.

With a dtest script you can easily run several application on the same host too
(the usual test case is to ssh on the localhost).

I have not much time to enhance DTest currently but I would be glad to
share ideas
and help people enhancing dtest. The discussion can continue here or
on the tsp mailing list: http://lists.nongnu.org/mailman/listinfo/tsp-devel.
(dtest is a TSP subproject)

I'm not usually doing such "self-promotion" but for this time I do
because this kind
of question is arising from time to time on this list and may be DTest
(or equivalent features) could be a valuable enhancement/or add-on to
CTest for some of us.

By the way DTest was named after D-istributed Test before I even began
to use CTest :-)
So there is no DMake nor DPack :-)

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list