How to find where the error is while running ctest

Puneet picture Puneet · Aug 3, 2011 · Viewed 10k times · Source

I got the following output after running make test, but how do i get to know what the error is?

Running tests...
Test project /home/puneet/puneet/office/alkimia/payment/build
    Start 1: alkimia-alkuser
1/4 Test #1: alkimia-alkuser ..................   Passed    0.20 sec
    Start 2: alkimia-alkinvoice
2/4 Test #2: alkimia-alkinvoice ...............***Failed    0.25 sec
    Start 3: alkimia-alkpayment
3/4 Test #3: alkimia-alkpayment ...............   Passed    0.22 sec
    Start 4: alkimia-alkpayee
4/4 Test #4: alkimia-alkpayee .................   Passed    0.22 sec

75% tests passed, 1 tests failed out of 4

Total Test time (real) =   0.89 sec

The following tests FAILED:
      2 - alkimia-alkinvoice (Failed)
Errors while running CTest
make: *** [test] Error 8

Answer

DLRdave picture DLRdave · Aug 3, 2011

If you run

make test VERBOSE=1

you'll see that the command line used to execute all the tests is a call to ctest.

If you run

ctest -R alkimia-alkinvoice

then only the failing test will be run.

If you run

ctest -R alkimia-alkinvoice -VV

then only the failing test will run and all of its output will also be displayed.