CTest を使用して、cmocka で記述されたテストを実行しています。CTest に私の cmocka ソースからテスト名を読み取らせ、出力でそれらを提供することが可能かどうかを知りたいです。たとえば、テスト ソースにtest_order_correct
、test_order_received
およびtest_customer_happy
の 3 つのテストが含まれている場合、これらのテストを という実行可能ファイルにビルドし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 はそのようなソースを掘り下げることができませんか? 私がこれをタイプしていると、その言葉ではますます可能性が少なくなっているように思えます。