doctest icon indicating copy to clipboard operation
doctest copied to clipboard

cmake: Add deduplication of test cases when they have the same name

Open nextsilicon-itay-bookstein opened this issue 3 years ago • 2 comments

Because in doctest multiple test cases may share the same name regardless of suite scope (if any), and they therefore cannot always be addressed individually, improve CTest discovery behavior by giving up parallelism and exposing them as one test to CTest. This will result in running N such name-colliding tests once in series rather than the current behavior of exposing them as N CTest tests which each run these N doctest tests in series.

Signed-off-by: Itay Bookstein [email protected]

Not sure this should be the default behavior - would like some input from others that are using these scripts...

onqtam avatar Nov 04 '21 16:11 onqtam

I agree that it's a bit peculiar and wasn't sure what the 'best' way to tackle this is; but I think running N^2 tests instead of N is more of a misbehavior than this wonky deduplication. I arrived at this solution as a consequence of the fact that tests are (understandably) not uniqued by name, even when you consider suite scoping.