Parse test execution time in unity fixture output#659
Parse test execution time in unity fixture output#659fy666 wants to merge 3 commits intoThrowTheSwitch:masterfrom
Conversation
|
Hello @mvandervoord, I'm very sorry to bother you but I was wondering if I did something wrong or I missed some steps for submitting this PR (as I got no reaction) ? Best regards, |
| def test_passed_unity_fixture(array) | ||
| class_name = array[0] | ||
| test_name = array[1] | ||
| test_time = get_test_time(array[array.length - 1]) |
There was a problem hiding this comment.
I assume this needs to be enabled by something, as by default we do not have the timing information.
There was a problem hiding this comment.
Thank you for reviewing :)
Yes indeed, the timing output has to be enabled using UNITY_INCLUDE_EXEC_TIME flag
There was a problem hiding this comment.
so shouldnt there be an if statement, otherwise you are just accessing test_name in the worst case?
There was a problem hiding this comment.
Yes, if the execution time is not present get_test_time will receive a string that wont match the "( ms)" pattern and return 0 (that strategy was already applied for normal unity output)
|
Why is this printout only for passed and not for other cases (failed)? |
|
in line 212 failed case also has time, so I am a bit puzzled why this also does not have it (as well as ignored). |
I updated the PR to parse time for fail and ignore cases (for consistency) However, please note that in unity fixture, the execution time is only printed for passing tests: https://github.com/ThrowTheSwitch/Unity/blob/master/extras/fixture/src/unity_fixture.c#LL298C13-L298C34 |
This I can't decide, but I like uniform behavior among features. Strange that other outputs had time in as well - so maybe that is inconsistency which we need to fix. Either have execution time on passing testcases only, or on all (but everywhere the same). |
Sorry for the delay. |
When using unity fixture with time output flag set,
parse_output.rbdid not parse the execution time.