From 7865836f4b0f698454c31b4593effcb032c22c1e Mon Sep 17 00:00:00 2001 From: kan Date: Sat, 19 May 2007 01:25:07 +0000 Subject: GCC 4.2.0 release C++ standard library and runtime support code. --- contrib/libstdc++/scripts/make_graphs.py | 160 +++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100755 contrib/libstdc++/scripts/make_graphs.py (limited to 'contrib/libstdc++/scripts/make_graphs.py') diff --git a/contrib/libstdc++/scripts/make_graphs.py b/contrib/libstdc++/scripts/make_graphs.py new file mode 100755 index 0000000..0b5daf2 --- /dev/null +++ b/contrib/libstdc++/scripts/make_graphs.py @@ -0,0 +1,160 @@ +#!/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 += '