#!/usr/bin/python import sys import commands import re from xml.dom import minidom from BeautifulSoup import BeautifulSoup import make_graph class exception: pass res_div_re = re.compile('(.*?)_res_div') settings_div_re = re.compile('(.*?)_settings_div') gray_border_div_str = '
' space_div_str = '
' 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 = '
' ret += '' % (label, label) ret += '