From c582733989e4d232d599ef2c73c954a61406a65c Mon Sep 17 00:00:00 2001 From: Robert Bruce Park Date: Tue, 19 Jan 2016 17:33:01 -0800 Subject: [PATCH] Make Heidi optional Setting HEIDI_OUTPUT to an empty value will skip the heidi generation, to speed up britney in scenarios where heidi is not needed. --- britney.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/britney.py b/britney.py index 46df2fd..8f03135 100755 --- a/britney.py +++ b/britney.py @@ -484,7 +484,7 @@ class Britney(object): if self.options.series == '': self.options.series = self.suite_info.target_suite.name - if not hasattr(self.options, "heidi_delta_output"): + if hasattr(self.options, 'heidi_output') and not hasattr(self.options, "heidi_delta_output"): self.options.heidi_delta_output = self.options.heidi_output + "Delta" self.options.smooth_updates = self.options.smooth_updates.split() @@ -1273,15 +1273,16 @@ class Britney(object): if not self.options.dry_run: target_suite = self.suite_info.target_suite - # write HeidiResult - self.logger.info("Writing Heidi results to %s", self.options.heidi_output) - write_heidi(self.options.heidi_output, - target_suite, - outofsync_arches=self.options.outofsync_arches) + if hasattr(self.options, 'heidi_output'): + # write HeidiResult + self.logger.info("Writing Heidi results to %s", self.options.heidi_output) + write_heidi(self.options.heidi_output, + target_suite, + outofsync_arches=self.options.outofsync_arches) - self.logger.info("Writing delta to %s", self.options.heidi_delta_output) - write_heidi_delta(self.options.heidi_delta_output, - self.all_selected) + self.logger.info("Writing delta to %s", self.options.heidi_delta_output) + write_heidi_delta(self.options.heidi_delta_output, + self.all_selected) self.logger.info("Test completed!")