File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,8 +293,33 @@ def run_tests(test_files)
293293 # Link the test executable
294294 link_it ( test_base , obj_list )
295295
296- # Execute unit test and generate results file
296+ # Execute unit test
297297 output = runtest ( test_base )
298+
299+ # Verify outputs seem to have happened
300+ failures = 0
301+ output = output . each_line . map do |line |
302+ if line =~ /Element.*Expected.*Was/ && !( line =~ /Element \d + Expected \S + Was \S +/ )
303+ failures += 1
304+ line + " [[[[ OUTPUT FAILED TO PRINT CORRECTLY ]]]]"
305+ else
306+ line
307+ end
308+ end . join
309+
310+ # Update the final test summary
311+ if failures > 0
312+ output . sub! ( /^(\d +) Tests (\d +) Failures (\d +) Ignored/ ) do
313+ tests = $1
314+ failures = $2. to_i + failures
315+ ignored = $3
316+ "#{ tests } Tests #{ failures } Failures #{ ignored } Ignored"
317+ end
318+ output . sub! ( /OK$/ , "FAILED" )
319+ report output
320+ end
321+
322+ # Generate results file
298323 save_test_results ( test_base , output )
299324 end
300325 end
You can’t perform that action at this time.
0 commit comments