Provide CTest a hint on test costs (and thus ordering)

When running tests in parallel, CTest runs the tests in decreasing
order of cost (time required), to get the largest speed up from
parallelism. However, the initial cost estimates for all tests are
0, and they are only updated after a test run. This works on a dev
machine, where the tests are ran over and over again, because
eventually the estimates become quite precise, but CI always does
a clean build with 0 estimates.

Because we have 2 slow tests, we want them to run first to avoid
losing parallelism. To do this, we provide them with a cost estimate
manually.
This commit is contained in:
Martin Hořeňovský
2020-02-03 09:07:23 +01:00
parent b86ab20154
commit a3ffc20f57
2 changed files with 8 additions and 1 deletions

View File

@@ -128,6 +128,8 @@ set_tests_properties(
BenchmarkingMacros
PROPERTIES
PASS_REGULAR_EXPRESSION "benchmark name samples iterations estimated"
COST 80 # We know that this is either the most, or second most,
# expensive test in the test suite, so we give it high estimate for CI runs
)
# This test touches windows.h, so it should only be compiled under msvc