From b57c7e0b5c673a0ea0bab8921b452a94bccd2576 Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Fri, 23 Jan 2026 16:19:24 -0500 Subject: [PATCH] Better output validation for catching bug #807 --- test/rakefile_helper.rb | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/test/rakefile_helper.rb b/test/rakefile_helper.rb index cabcc99..04d528f 100644 --- a/test/rakefile_helper.rb +++ b/test/rakefile_helper.rb @@ -293,8 +293,33 @@ module RakefileHelpers # Link the test executable link_it(test_base, obj_list) - # Execute unit test and generate results file + # Execute unit test output = runtest(test_base) + + # Verify outputs seem to have happened + failures = 0 + output = output.each_line.map do |line| + if line =~ /Element.*Expected.*Was/ && !(line =~ /Element \d+ Expected \S+ Was \S+/) + failures += 1 + line + " [[[[ OUTPUT FAILED TO PRINT CORRECTLY ]]]]" + else + line + end + end.join + + # Update the final test summary + if failures > 0 + output.sub!(/^(\d+) Tests (\d+) Failures (\d+) Ignored/) do + tests = $1 + failures = $2.to_i + failures + ignored = $3 + "#{tests} Tests #{failures} Failures #{ignored} Ignored" + end + output.sub!(/OK$/,"FAILED") + report output + end + + # Generate results file save_test_results(test_base, output) end end