4312e020f1
2008-01-18 Benjamin Kosnik <bkoz@redhat.com> * docs/*: To... * doc/*: ...here. * testsuite/Makefile.am: Move doc-performance to... * Makefile.am: Add doc to SUBDIRS, move doxygen-* rules to... * doc/Makefile.am: Consolidate documentation creation here. (doc-doxygen-html): New. (doc-doxygen-man): New. (doc-performance): New. * doc/Makefile.in: New. * acinclude.m4 (glibcxx_SUBDIRS): Add doc directory. * doc/doxygen/guide.html: Edit for unified html configuration. * doc/doxygen/mainpage.html: Same. * doc/doxygen/run_doxygen: Same, more namespace fixups for man generation. * doc/doxygen/user.cfg.in: Update for doxygen 1.5.4. * include/tr1_impl/random: Remove maint from doxygen markup. * include/tr1_impl/functional: Same. * include/std/tuple: Same. * include/std/streambuf: Same. * include/std/bitset: Same. * include/std/limits: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/sstream: Same. * include/ext/pool_allocator.h: Same. * include/ext/rc_string_base.h: Same. * include/bits/basic_ios.h: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_relops.h: Same. * include/tr1/tuple: Same. * include/backward/auto_ptr.h: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Fixups for line number changes. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/auto_ptr/assign_neg.cc: Same. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * libmath/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * scripts/make_graphs.py: Correct paths for new layout. 2008-01-17 Benjamin Kosnik <bkoz@redhat.com> * acinclude.m4 (AC_LC_MESSAGES): Remove serial. * linkage.m4 (AC_REPLACE_MATHFUNCS): Same. * configure: Regenerate. * aclocal.m4: Regenerate. From-SVN: r131625
161 lines
4.5 KiB
Python
Executable File
161 lines
4.5 KiB
Python
Executable File
#!/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 = '<div style = "border-style: dotted; border-width: 1px; border-color: lightgray">'
|
|
space_div_str = '<div style = "width: 100%; height: 20px">'
|
|
|
|
|
|
|
|
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_', '<tt>')
|
|
title = title.replace('_455tt_', '</tt>')
|
|
title = title.replace('_b_', '<b>')
|
|
title = title.replace('_455b_', '</b>')
|
|
title = title.replace('_456', ',')
|
|
title = title.replace('_457', '[]')
|
|
title = title.replace('_', ' ')
|
|
return '%s: %s - <a href = "%s_performance_tests.html#%s">%s</a>' % (
|
|
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 = '<h6 class="c1">'
|
|
ret += '<a name="%s" id= "%s">' % (label, label)
|
|
ret += '<img src="%s" ' % (test_name + '_' + build + '.png')
|
|
ret += 'alt="no image" />'
|
|
ret += '</a></h6>'
|
|
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 += '<h3><a name = "%s"><u>%s</u></a></h3>' % (build, logical_build_name)
|
|
info += make_graph.comp_platform_info(compiler_name)
|
|
info += '</div>%s</div>' % space_div_str
|
|
d.contents = info
|
|
elif res_m:
|
|
label = res_m.groups()[0]
|
|
d = d.divTag
|
|
|
|
build = d['id'].replace('%s_' % label, '')
|
|
|
|
if build == build_name:
|
|
logical_build_name = logical_build_from_build(build)
|
|
d = d.divTag
|
|
test_name = d['id'].replace('%s_' % label, '')
|
|
d = d.divTag
|
|
base_build_ref = d['id'].replace('%s_' % label, '')
|
|
d = d.divTag
|
|
title = d['id'].replace('%s_' % label, '')
|
|
img_title = img_title_from_origs(label, title, base_build_ref, build, logical_build_name)
|
|
|
|
make_png(src_dir, doc_dir, res_dir, tests_info_xml_f_name, build_name, test_name)
|
|
png_str = make_png_str(label, test_name, build)
|
|
content = gray_border_div_str
|
|
content += png_str
|
|
content += img_title
|
|
# content += make_graph.legend(doc_dir, res_dir, tests_info_xml_f_name, test_name, build_name)
|
|
content += '</div>%s</div>' % space_div_str
|
|
d.contents = content
|
|
|
|
return soup
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
"""
|
|
Doc dir
|
|
This module takes 6 parameters from the command line:
|
|
Source directory
|
|
Build directory
|
|
HTMLs XML file name
|
|
Tests info XML file name
|
|
Build name
|
|
Compiler name
|
|
"""
|
|
|
|
usg = "make_graph.py <src_dir> <build_dir> <htmls_xml_f_name> <tests_info_xml_f_name> <build_name> <compiler_name>\n"
|
|
|
|
if len(sys.argv) != 7:
|
|
sys.stderr.write(usg)
|
|
raise exception
|
|
|
|
src_dir = sys.argv[1]
|
|
build_dir = sys.argv[2]
|
|
htmls_xml_f_name = sys.argv[3]
|
|
tests_info_xml_f_name = sys.argv[4]
|
|
build_name = sys.argv[5]
|
|
compiler_name = sys.argv[6]
|
|
doc_dir = src_dir + "/doc/html/ext/pb_ds"
|
|
htmls_dat = minidom.parse(htmls_xml_f_name)
|
|
for html in htmls_dat.getElementsByTagName('html'):
|
|
html_f_name = html.attributes['name'].value
|
|
|
|
new_soup = process_html(html_f_name, src_dir, build_dir, htmls_xml_f_name, tests_info_xml_f_name, build_name, compiler_name)
|
|
|
|
html_f = open(doc_dir + '/' + html_f_name, 'w')
|
|
html_f.write(str(new_soup))
|
|
html_f.close()
|
|
|
|
|