Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions auto/parse_output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ def prepare_fixture_line(line)
def test_passed_unity_fixture(array)
class_name = array[0]
test_name = array[1]
test_time = get_test_time(array[array.length - 1])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this needs to be enabled by something, as by default we do not have the timing information.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for reviewing :)
Yes indeed, the timing output has to be enabled using UNITY_INCLUDE_EXEC_TIME flag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so shouldnt there be an if statement, otherwise you are just accessing test_name in the worst case?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

test_suite_verify(class_name)
printf "%-40s PASS\n", test_name
printf "%-40s PASS %10d ms\n", test_name, test_time

push_xml_output_passed(test_name) if @xml_out
push_xml_output_passed(test_name, test_time) if @xml_out
end

# Test was flagged as having failed so format the output.
Expand Down