Skip to content

Extra output in CMake ctest output #3183

Description

@SimeonEhrig

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions