X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Fscripts%2Fmake_graphs.py;fp=libstdc%2B%2B-v3%2Fscripts%2Fmake_graphs.py;h=e230e7a9983a7f320e372335ba954209a2c86a4b;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=0000000000000000000000000000000000000000;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/libstdc++-v3/scripts/make_graphs.py b/libstdc++-v3/scripts/make_graphs.py new file mode 100755 index 00000000..e230e7a9 --- /dev/null +++ b/libstdc++-v3/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 += '