mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-09-25 03:27:26 +00:00
fixup! Parse test execution time in unity fixture output
This commit is contained in:
@@ -143,13 +143,14 @@ class ParseOutput
|
||||
def test_failed_unity_fixture(array)
|
||||
class_name = array[0]
|
||||
test_name = array[1]
|
||||
test_time = get_test_time(array[array.length - 1])
|
||||
test_suite_verify(class_name)
|
||||
reason_array = array[2].split(':')
|
||||
reason = reason_array[-1].lstrip.chomp + ' at line: ' + reason_array[-4]
|
||||
|
||||
printf "%-40s FAILED\n", test_name
|
||||
printf "%-40s FAILED %10d ms\n", test_name, test_time
|
||||
|
||||
push_xml_output_failed(test_name, reason) if @xml_out
|
||||
push_xml_output_failed(test_name, reason, test_time) if @xml_out
|
||||
end
|
||||
|
||||
# Test was flagged as being ignored so format the output.
|
||||
@@ -157,6 +158,7 @@ class ParseOutput
|
||||
def test_ignored_unity_fixture(array)
|
||||
class_name = array[0]
|
||||
test_name = array[1]
|
||||
test_time = get_test_time(array[array.length - 1])
|
||||
reason = 'No reason given'
|
||||
if array.size > 2
|
||||
reason_array = array[2].split(':')
|
||||
@@ -164,9 +166,9 @@ class ParseOutput
|
||||
reason = tmp_reason == 'IGNORE' ? 'No reason given' : tmp_reason
|
||||
end
|
||||
test_suite_verify(class_name)
|
||||
printf "%-40s IGNORED\n", test_name
|
||||
printf "%-40s IGNORED %10d ms\n", test_name, test_time
|
||||
|
||||
push_xml_output_ignored(test_name, reason) if @xml_out
|
||||
push_xml_output_ignored(test_name, reason, test_time) if @xml_out
|
||||
end
|
||||
|
||||
# Test was flagged as having passed so format the output
|
||||
|
||||
Reference in New Issue
Block a user