'
def logical_build_from_build(build):
if build == 'gcc':
return 'g++'
if build == 'msvc':
return 'msvc++'
if build == 'local':
return 'local'
sys.stderr.write(build)
raise exception
def img_title_from_origs(label, title, base_build_ref, build_name, logical_build_name):
title = title.replace('_tt_', '
')
title = title.replace('_455tt_', '')
title = title.replace('_b_', '
')
title = title.replace('_455b_', '')
title = title.replace('_456', ',')
title = title.replace('_457', '[]')
title = title.replace('_', ' ')
return '%s: %s -
%s' % (
label,
title,
base_build_ref,
build_name,
logical_build_name)
def make_png(src_dir, doc_dir, res_dir, tests_info_xml_f_name, build_name, test_name):
cmd_str = '%s/scripts/make_graph.py %s %s %s %s %s' % (
src_dir, doc_dir,
res_dir,
tests_info_xml_f_name,
test_name,
build_name)
# Must start a new process for pychart - otherwise pngs overlap.
so = commands.getstatusoutput(cmd_str)
if(so[0] != 0):
sys.stderr.write(cmd_str + '\n')
sys.stderr.write(so[1] + '\n')
sys.exit(-1)
def make_png_str(label, test_name, build):
ret = '
'
return ret
def process_html(html_f_name, src_dir, build_dir, htmls_xml_f_name, tests_info_xml_f_name, build_name, compiler_name):
doc_dir = src_dir + "/doc/html/ext/pb_ds"
res_dir = build_dir
html_f = open(doc_dir + '/' + html_f_name)
soup = BeautifulSoup(html_f.read())
html_f.close()
platform_comp_re = re.compile('platform_comp_%s' % build_name)
for d in soup('div'):
try:
settings_m = settings_div_re.match(d['id'])
res_m = res_div_re.match(d['id'])
except:
settings_m = None
res_m = None
if settings_m:
build = settings_m.groups()[0]
if build == build_name:
logical_build_name = logical_build_from_build(build)
info = gray_border_div_str
info += '
' % (build, logical_build_name)
info += make_graph.comp_platform_info(compiler_name)
info += '