[CMake] Running python nose tests

Tyler Roscoe tyler at cryptio.net
Fri Jun 5 12:24:49 EDT 2009


On Thu, Jun 04, 2009 at 04:02:54PM -0400, Eric Jonas wrote:
> I've written a server that serves up an interface using a cross-language
> RPC mechanism (dbus) and currently build and unit test with cmake. But
> testing cross-language (and more functional) aspects of the server is
> easier to do from python, where I can rapidly test the RPC API. I've
> written a collection of tests that I can run using the nose unit test
> framework, but now I'm curious about how to include these in my
> CMake-based test infrastructure. Has anyone had success running what are
> basically python unit tests (or a framework like nose) from within
> cmake?

I don't know anything about nose but CTest is highly configurable. When
you do add_test(), you can specify any executable. For example, we wrap
our unit tests with a python script to insure that the environment is
configured in a known way. You can also configure CTest to understand
what nose reports as a successful or failed unit test run if the
defaults don't work.

hth,
tyler


More information about the CMake mailing list