From 32511eb601c6f145f415ab11a19fbde4813d46b2 Mon Sep 17 00:00:00 2001 From: Rafal Bielski <rafal.bielski@cern.ch> Date: Tue, 7 Apr 2020 14:03:36 +0200 Subject: [PATCH] Allow users to set CheckLogStep properties The three properties were being set in configure() overriding any user-set values. Change the default to None and only override in configure() if the values are not set. --- .../python/TrigValSteering/CheckSteps.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py index 575d4834b45..fdbd616c4c5 100644 --- a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py +++ b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py @@ -236,6 +236,10 @@ class CheckLogStep(Step): self.check_warnings = False self.config_file = None self.args = '--showexcludestats' + # The following three are updated in configure() if not set + self.required = None + self.auto_report_result = None + self.output_stream = None def configure(self, test): if self.config_file is None: @@ -256,10 +260,14 @@ class CheckLogStep(Step): self.args += ' --errors' if self.check_warnings: self.args += ' --warnings' - if self.check_errors and not self.check_warnings: - self.output_stream = Step.OutputStream.FILE_AND_STDOUT - self.auto_report_result = True - self.required = True + + errors_only = self.check_errors and not self.check_warnings + if self.output_stream is None: + self.output_stream = Step.OutputStream.FILE_AND_STDOUT if errors_only else Step.OutputStream.FILE_ONLY + if self.auto_report_result is None: + self.auto_report_result = errors_only + if self.required is None: + self.required = errors_only self.args += ' --config {} {}'.format(self.config_file, self.log_file) -- GitLab