зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1156885 - Fix and validate perfherder output;r=jmaher
MozReview-Commit-ID: K7SxuEa8dKe --HG-- extra : rebase_source : 21ebf1a8ed77bd1251a518c698e460c208b26a9f
This commit is contained in:
Родитель
40fe704b00
Коммит
b4489b3ca5
|
@ -1,6 +1,8 @@
|
|||
|
||||
#!/usr/bin/python
|
||||
import subprocess
|
||||
import json
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
def count_ctors(filename):
|
||||
|
@ -47,6 +49,15 @@ def count_ctors(filename):
|
|||
|
||||
if __name__ == '__main__':
|
||||
for f in sys.argv[1:]:
|
||||
output = {"framework": {"name": "build_metrics"}, "suites": [{"name": "compiler_metrics", "subtests": [{"name": "num_constructors", "value": count_ctors(f)}] } ]}
|
||||
print "PERFHERDER_DATA: %s" % output
|
||||
perfherder_data = {
|
||||
"framework": {"name": "build_metrics"},
|
||||
"suites": [{
|
||||
"name": "compiler_metrics",
|
||||
"subtests": [{
|
||||
"name": "num_constructors",
|
||||
"value": count_ctors(f)
|
||||
}]}
|
||||
]
|
||||
}
|
||||
print "PERFHERDER_DATA: %s" % json.dumps(perfherder_data)
|
||||
|
||||
|
|
|
@ -1223,6 +1223,8 @@ or run without that action (ie: --no-{action})"
|
|||
def _count_ctors(self):
|
||||
"""count num of ctors and set testresults."""
|
||||
dirs = self.query_abs_dirs()
|
||||
python_path = os.path.join(dirs['abs_work_dir'], 'venv', 'bin',
|
||||
'python')
|
||||
abs_count_ctors_path = os.path.join(dirs['abs_src_dir'],
|
||||
'build',
|
||||
'util',
|
||||
|
@ -1232,8 +1234,9 @@ or run without that action (ie: --no-{action})"
|
|||
'bin',
|
||||
'libxul.so')
|
||||
|
||||
cmd = ['python', abs_count_ctors_path, abs_libxul_path]
|
||||
self.get_output_from_command(cmd, cwd=dirs['abs_src_dir'])
|
||||
cmd = [python_path, abs_count_ctors_path, abs_libxul_path]
|
||||
self.get_output_from_command(cmd, cwd=dirs['abs_src_dir'],
|
||||
throw_exception=True)
|
||||
|
||||
def _generate_properties_file(self, path):
|
||||
# TODO it would be better to grab all the properties that were
|
||||
|
|
Загрузка…
Ссылка в новой задаче