Bug 1462462 - Log mozharness command environment only when it changes; r=jmaher

If the environment used for a mozharness command is identical to the previous
command's environment, report only "same as previous command".
This commit is contained in:
Geoff Brown 2018-05-28 15:38:27 -06:00
Родитель aad85f835e
Коммит 35b1fa282a
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -1382,8 +1382,12 @@ class ScriptMixin(PlatformMixin):
if partial_env:
self.info("Using partial env: %s" % pprint.pformat(partial_env))
env = self.query_env(partial_env=partial_env)
else:
if hasattr(self, 'previous_env') and env == self.previous_env:
self.info("Using env: (same as previous command)")
else:
self.info("Using env: %s" % pprint.pformat(env))
self.previous_env = env
if output_parser is None:
parser = OutputParser(config=self.config, log_obj=self.log_obj,