[CMake] ctest meant to be re-entrant?

David Cole david.cole at kitware.com
Mon Jun 21 13:44:38 EDT 2010


On Mon, Jun 21, 2010 at 1:18 PM, Convey, Christian J CIV NUWC NWPT <
christian.convey at navy.mil> wrote:

> Sorry, that was embarrassing.  Pretend I had said, "CTestTestFile.cmake"
> instead of "CTestConfig.cmake".
>

Well, in that case.... CMake writes the CTestTestFile.cmake files whenever
it configures a build tree. (So, from a ctest -S script, during the
"ctest_configure(...)" call.) The ctest executable will read the
CTestTestFile.cmake files when it needs to execute tests: when run from the
command line to execute tests, or when processing a ctest_test(...) command
in a -S script...

So again: only one writer, at one well-defined time. I don't think there
should be any problems with respect to the CTestTestFile.cmake files. The
confusion arises perhaps because ctest is used as a "simple" test driver and
also as a full configure/build/test/run-a-dashboard driver. The
CTestTestFile.cmake files are used when it is acting as a simple test
driver. You would write a script to be processed with -S, or run a -D
Nightly or -D Experimental dashboard separately: that is not connected to
the CTestTestFiles at all.

I suppose you could probably contrive a case where an executing test
actually re-configures the build tree that it is in, but I'd be surprised if
that happens in practice. If shown to be problematic, and reported with
reasonable steps to reproduce to the CMake bug tracker, we could add code to
detect such pathological cases and fail with an error...


HTH,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100621/f04d3fbf/attachment.htm>


More information about the CMake mailing list