Search code examples
cmakectest

What is the default COST of a CTest test


One of the properties you can set for a test is its COST. Tests are run in descending COST order.

But if you set a COST for only some of your tests, how are those tests ordered with respect to the tests that do not have an explicit COST? That is, what is the default COST of a test?


Solution

  • Experimentation with CMake 3.7 suggests that the default test COST is 0. As it runs tests in descending COST order, it will run your tests with explicit positive COST properties before the tests without COST properties.