The example for the parallel test runner uses std::for_each(std::execution::par, ...) to demonstrate running several test suites in parallel. I expect the tests to actually run in separate threads.
Actual Behavior
In practice on my machine, this isn't actually executed in parallel. As proof: GDB shows no thread being created, and std::this_thread::get_id() is the same in both suites.
If I force the suites to run in separate threads with
the console output is interleaving results from both threads. To make this more obvious, I have edited some of assertions to fail in each suite. As you can see, the output is not readable:
Expected Behavior
The example for the parallel test runner uses
std::for_each(std::execution::par, ...)
to demonstrate running several test suites in parallel. I expect the tests to actually run in separate threads.Actual Behavior
In practice on my machine, this isn't actually executed in parallel. As proof: GDB shows no thread being created, and
std::this_thread::get_id()
is the same in both suites.If I force the suites to run in separate threads with
the console output is interleaving results from both threads. To make this more obvious, I have edited some of assertions to fail in each suite. As you can see, the output is not readable:
Steps to Reproduce the Problem
parallel_runner.cpp
example to insertstd::cout << "thread ID: " << std::this_thread::get_id() << std::endl;
in each test suite.Specifications