CTest Performance in finding cases in build tree

Hi cmake support team,

We are heavily leverage cmake/ctest as our build and test management system, while we are facing a ctest performance problem in our case.

In our case, we had defined almost 100 thoughts ctest cases, while when we trying to run any single ctest case in the build tree, it will take several minutes to finish the search to launch.

This make us especially developer suffered a lot, would you be able to give us any suggestion on how to make ctest accelerate to find the cases to run ?


The performance problem was reported here on Discourse a while ago (it’s an O(n²) loop buried in there). I have a WIP MR that needs some test suite breakage investigation(s) if someone wants to try and take it across the line…