如何在运行ctest时查找错误的位置 [英] How to find where the error is while running ctest
本文介绍了如何在运行ctest时查找错误的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行make测试后,我得到以下输出,但是我怎么知道错误是什么?
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
推荐答案
如果您运行
make test VERBOSE=1
您会看到用于执行所有测试的命令行是对ctest。
you'll see that the command line used to execute all the tests is a call to ctest.
如果您运行
ctest -R alkimia-alkinvoice
然后仅运行失败的测试。
then only the failing test will be run.
如果您运行
ctest -R alkimia-alkinvoice -VV
然后将仅运行失败的测试,并且还将显示其所有输出。
then only the failing test will run and all of its output will also be displayed.
这篇关于如何在运行ctest时查找错误的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文