Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ask Cmake output googletest detailed result

Normally, if I type make test with the cmake generated makefile, it will show something like this:

    Start 1: UnitTest
1/2 Test #1: UnitTest .........................***Failed    0.01 sec
    Start 2: PerfTest
2/2 Test #2: PerfTest .........................   Passed    0.01 sec

50% tests passed, 1 tests failed out of 2

Total Test time (real) =   0.02 sec

The following tests FAILED:
      1 - UnitTest (Failed)

But what if I want to see the real output from googletest, which tells me exactly what failed? Is there a way to force cmake/ctest spit it out?

UPDATE: now I know I can type ctest -V to show detailed output, but how can I achieve the same using make test?

like image 566
swang Avatar asked Jan 09 '23 07:01

swang


1 Answers

I figured out I can do this:

make test ARGS=-V
like image 158
swang Avatar answered Jan 10 '23 20:01

swang