2011-08-03 29 views
11

运行make test后我得到了以下输出,但是如何才能知道错误是什么?如何在运行ctest时发现错误的位置

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 

回答

13

如果运行

make test VERBOSE=1 

,你会看到,用于执行所有测试命令行是CTEST通话。

如果运行

ctest -R alkimia-alkinvoice 

则只有失败的测试将会运行。

如果运行

ctest -R alkimia-alkinvoice -VV 

则只有失败的测试运行,所有它的输出也将显示出来。

+0

非常感谢您的回复,这就是我所需要的 – Puneet