mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user