[CMake] Customizing output of ctest command

Andrey Pokrovskiy wonder.mice at gmail.com
Wed Jan 20 15:02:18 EST 2016


Hi,

One of my tests generates a report table (file in text format). I
would like to see its content after each ctest (or make test)
invocation. Is there any way to achieve that?
I noticed that tests targets have ATTACHED_FILES property, though it
looks like it has no effect on ctest run when dashboard is not
configured. I don't need and don't want to setup dashboard, but I
would like to include information that is important to me in ctest
output.

For example:

[...]
Start 33: run_tests
33/33 Test #33: run_tests .............................   Passed    0.06 sec

100% tests passed, 0 tests failed out of 33

Total Test time (real) =   0.28 sec

/* Attached: results.json */
{
    "call_site_size": {
        "zf_log": "48",
        "easylogging++": "376",
        "glog": "144",
        "spdlog": "352",
        "g3log": "360"
    }
}


More information about the CMake mailing list