How to find where the error is while running ctest
Asked Answered
S

1

14

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
Spoon answered 3/8, 2011 at 18:12 Comment(0)
T
19

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.

Tuque answered 3/8, 2011 at 21:7 Comment(3)
Thanks a lot of your reply, this was what i neededSpoon
For me, when running either ctest, it says that No tests were found!!! Although I have 1 failing test out of 7.Warmhearted
Try adding -C Release or -C Debug if you are using a Visual Studio, or Xcode, or other multi-configuration CMake generator for that build tree.Tuque

© 2022 - 2024 — McMap. All rights reserved.