[CMake] ctest - how to specify tests that must not run in parallel

Miller Henry MillerHenry at JohnDeere.com
Fri Nov 15 09:39:45 EST 2013


I just switched to using ctest, which is overall much better, but when I run with -j it often happens that some test suite fails.  After investigating I discovered that the failing test is not a unit tests (ie a test with everything mocked out), but an integration test that is intentionally testing our use of global system resources.  The test is failing because a different integration test is also using those global resources and changing states.

Is there a way to mark tests as using some global resource and thus not able to run in parallel?  My current work around is to use -R and -E to run the tests in question separately, but I have enough other tests that don't use this global resource that everything could run in parallel if there was some way to tell ctest to not schedule them together, and thus increase our total test time.  This would also scale better than telling every developer who is using ctest the correct -E and -R commands to make things work.

Do I open a feature request, or does this already exist?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131115/cb34c539/attachment.htm>


More information about the CMake mailing list