You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
We use catch2 together with CMake ctest. We run the tests with ctest --output-on-failure. If the test fails, we want to get some additional information, like which GPU we used. The problem is controlling which output is displayed. In the best case, we want to have the FAIL() macro without that the test fails. It prints on stderr and only if the test fails.
We could use INFO() or WARN() together with the -s flag, but then we get the output also for passing tests and the output can be very verbose.
Is there a solution, to print extra information on stderr only in the case that a test fails?
Description
We use catch2 together with CMake
ctest. We run the tests withctest --output-on-failure. If the test fails, we want to get some additional information, like which GPU we used. The problem is controlling which output is displayed. In the best case, we want to have the FAIL() macro without that the test fails. It prints on stderr and only if the test fails.We could use
INFO()orWARN()together with the-sflag, but then we get the output also for passing tests and the output can be very verbose.Is there a solution, to print extra information on stderr only in the case that a test fails?