OpenTimelineIO icon indicating copy to clipboard operation
OpenTimelineIO copied to clipboard

Enable verbose mode on c++ unit tests

Open rogernelson opened this issue 2 years ago • 1 comments

Feature Request

This a proposed change to an existing feature on the C++ unit tests. It would be nice to run the tests in verbose mode.

Description

If we add the verbose mode switch to ctest we can know which subtest within the test caused the failure. Currently the output looks like this:

Test project /Users/nelsonr/git/public/OpenTimelineIO/_build
    Start 1: test_opentime
1/2 Test #1: test_opentime ....................   Passed    0.01 sec
    Start 2: test_clip
2/2 Test #2: test_clip ........................   Passed    0.01 sec

100% tests passed, 0 tests failed out of 2

By adding the -V switch we will have this:

test 1
    Start 1: test_opentime

1: Test command: /Users/nelsonr/git/public/OpenTimelineIO/_build/tests/test_opentime
1: Test timeout computed to be: 1500
1: Running test test_create
1: Running test test_equality
1: Running test test_inequality
1/2 Test #1: test_opentime ....................   Passed    0.56 sec
test 2
    Start 2: test_clip

2: Test command: /Users/nelsonr/git/public/OpenTimelineIO/_build/tests/test_clip
2: Test timeout computed to be: 1500
2: Running test test_cons
2: Running test test_ranges
2: Running test test_clip_v1_to_v2_null
2: Running test test_clip_v1_to_v2
2: Running test test_clip_media_representation
2/2 Test #2: test_clip ........................   Passed    0.02 sec

If we get a failure, this will allow us to know which subtest caused the failure.

rogernelson avatar Mar 21 '22 17:03 rogernelson

Looks like a good idea to me.

meshula avatar Mar 21 '22 18:03 meshula