[CMake] ctest, timeout per test/cmd

Pierre pierre.php at gmail.com
Wed Jan 24 10:36:40 EST 2007


Hi Ken,

On 1/23/07, Pierre <pierre.php at gmail.com> wrote:
> Hi Ken,
>
> On 1/23/07, Ken Martin <ken.martin at kitware.com> wrote:
> > > The problem with DART_TESTING_TIMEOUT and CTEST_TEST_TIMEOUT is that
> > > they apply to the complete test suites. What I'm trying to solve is
> > > some infinite loops test cases, I like the tests to fail/timeout but
> > > the next tests should be executed as well.
> >
> > Just to make sure we are on the same page :) DART_TESTING_TIMEOUT applies to
> > each test. Once one times out the next will start. It is not a limit for the
> > entire process but for each test. Each test is given DART_TESTING_TIMEOUT
> > seconds to complete independent of the time any other test took to run.
>
> Oh my.. yes, I mis read the doc about TEST_TIMEOUT, adding:
>
>         SET(DART_TESTING_TIMEOUT 5)
>
> to my CMakeLists.txt works like a charm.

As a side note, it works well with a debug build but fails using a non
debug build. I did not check the code to see how it works, but what do
you use to call the tests and manage the timeouts?

As an example of, you can use my cmake scripts (my first try :) from here:

http://cvs.php.net/gd/libgd/

See README.TESTING for the available options.

It works when you build the libgd and then test but the timeout does
not work when it is used against an external (non debug build)
version.

--Pierre


More information about the CMake mailing list