From 12284bf662239303923b1e971de02f729048b5a3 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 20 Mar 2021 13:15:22 +0100 Subject: [PATCH] tests: prevent updating results if results contain 'failed' --- tests/test.d/controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test.d/controller.rb b/tests/test.d/controller.rb index ab65b48f9..3e9f08ebb 100644 --- a/tests/test.d/controller.rb +++ b/tests/test.d/controller.rb @@ -134,7 +134,9 @@ class Controller idx += 1 unless command[:no_result] end - if (update_failed) + if (update_failed && actual_results.include?("failed")) + self.add_result class_name, :failed, :message => msg + " FATAL: cannot update result as test results include 'failed'" + elsif (update_failed) self.add_result class_name, :passed, :message => msg + " UPDATING result\n", :checksum => result, :duration => duration else self.add_result class_name, :failed, :message => msg