Skip second-stage upgrade testing if UPGRADE_OUTPUT option is absent or empty

This is useful to speed up britney in dry run mode, if we are only interested
in builds and package tests.
This commit is contained in:
Martin Pitt 2015-12-18 16:37:23 +01:00 committed by Martin Pitt
parent b549788210
commit d1ea68dd51

View File

@ -3048,6 +3048,13 @@ class Britney(object):
else:
self.upgrade_me = self.options.actions.split()
# skip upgrade testing if UPGRADE_OUTPUT option is absent or empty
try:
if not self.options.upgrade_output:
return
except AttributeError:
return
with open(self.options.upgrade_output, 'w', encoding='utf-8') as f:
self.__output = f