我使用CTest来运行用cmocka编写的测试。我想知道是否有可能让CTest从我的cmocka源读取测试名称,并在输出时提供给我。例如,如果我的测试源包含3个测试:test_order_correct、test_order_received和test_customer_happy,如果我将这些测试构建到一个名为tests的可执行文件中,并使用CTest运行它,那么我得到的唯一输出是:
Test project .......
Start 1: tests
1/1 Test #1: tests ......................... Passed 0.00 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 0.01 sec我想看看:
Test project .......
Start 1: test_order_correct
1/3 Test #1: test_order_correct .......................... Passed 0.00 sec
Start 2: test_order_received
2/3 Test #2: test_order_received ......................... Passed 0.00 sec
Start 3: test_customer_happy
3/3 Test #3: test_customer_happy ......................... Passed 0.00 sec
100% tests passed, 0 tests failed out of 3
Total Test time (real) = 0.01 sec这是可能的吗,还是CTest不能像这样深入探究源代码呢?当我键入这个词时,这个词似乎越来越不可能了。
发布于 2015-11-23 08:19:53
如果您调用“make”,它只会减少输出。更详细的是,只需在构建目录中调用'ctest -V‘即可。
https://stackoverflow.com/questions/33832530
复制相似问题