зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1487180 - Upload the build graph report as a part of the tup build. r=mshal
Differential Revision: https://phabricator.services.mozilla.com/D4626 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
89393b1268
Коммит
1f2797495b
|
@ -14,6 +14,7 @@ import shutil
|
|||
import mozpack.path as mozpath
|
||||
from mozbuild import shellutil
|
||||
from mozbuild.analyze.graph import Graph
|
||||
from mozbuild.analyze.hg import Report
|
||||
from mozbuild.base import MozbuildObject
|
||||
from mozbuild.backend.base import PartialBackend, HybridBackend
|
||||
from mozbuild.backend.recursivemake import RecursiveMakeBackend
|
||||
|
@ -317,13 +318,20 @@ class TupBackend(CommonBackend):
|
|||
append_env=self._get_mozconfig_env(config))
|
||||
tiers.finish_tier('tup')
|
||||
if not status and self.environment.substs.get('MOZ_AUTOMATION'):
|
||||
config.log_manager.enable_unstructured()
|
||||
config._activate_virtualenv()
|
||||
config.virtualenv_manager.install_pip_package('tablib==0.12.1')
|
||||
src = mozpath.join(self.environment.topsrcdir, '.tup')
|
||||
dst = os.environ['UPLOAD_PATH']
|
||||
if self.environment.substs.get('UPLOAD_TUP_DB'):
|
||||
shutil.make_archive(mozpath.join(dst, 'tup_db'), 'zip', src)
|
||||
g = Graph(mozpath.join(src, 'db'))
|
||||
cost_dict = Graph(mozpath.join(src, 'db')).get_cost_dict()
|
||||
with gzip.open(mozpath.join(dst, 'cost_dict.gz'), 'wt') as outfile:
|
||||
json.dump(g.get_cost_dict(), outfile)
|
||||
json.dump(cost_dict, outfile)
|
||||
# Additionally generate a report with 30 days worth of data
|
||||
# for upload.
|
||||
r = Report(30, cost_dict=cost_dict)
|
||||
r.generate_output('html', None, dst)
|
||||
return status
|
||||
|
||||
def _get_backend_file(self, relobjdir):
|
||||
|
|
Загрузка…
Ссылка в новой задаче