亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? report.py

?? boost庫提供標準的C++ API 配合dev c++使用,功能更加強大
?? PY
字號:
# (C) Copyright MetaCommunications, Inc. 2003.
#
# Permission to use, copy, modify, distribute and sell this software
# and its documentation for any purpose is hereby granted without fee, 
# provided that the above copyright notice appears in all copies and 
# that both the copyright notice and this permission notice appear in 
# supporting documentation. No representations are made about the 
# suitability of this software for any purpose. It is provided "as is" 
# without express or implied warranty.

import shutil
import sys
import os
import os.path
import string
import time
import inspect
import getopt

if __name__ == "__main__":
    run_dir = os.path.abspath( os.path.dirname( sys.argv[ 0 ] ) )
else:
    run_dir = os.path.abspath( os.path.dirname( sys.modules[ __name__ ].__file__ ) )

class failure_exception:
    def __init__( self, rc ):
        self.rc_ = rc

def log_level():
   frames = inspect.stack()
   level = 0
   for i in frames[ 3: ]:
       if i[0].f_locals.has_key( "__log__" ):
           level = level + i[0].f_locals[ "__log__" ]
   return level
 

def stdlog( message ):
    sys.stderr.write( "# " + "    " * log_level() +  message + "\n" );
    sys.stderr.flush()

log = stdlog
# log = lambda x: x

def system( commands ):
    f = open( "tmp.cmd", "w" )
    f.write( string.join( commands, "\n" ) )
    f.close()
    rc = os.system( "tmp.cmd" )
    return rc


def checked_system( commands ):
    rc = system( commands ) 
    if 0 != rc : raise failure_exception( rc )
    return rc


def set_char( str, index, char ):
    return str[ 0 : index ] + char + str[ index + 1: ]


def process_xml_file( input_file, output_file ):
    log( "Processing test log \"%s\"" % input_file )
    
    f = open( input_file, "r" )
    xml = f.readlines();
    f.close()
    
    ascii_chars = ''.join(map(chr, range(0,128)))
    nonascii_chars = ''.join(map(chr, range(128,256)))
    translated_ascii_chars = ''.join( map( lambda x: "?", range(128,256)))
    for i in string.printable:
        if ( ord( i ) < 128 and ord(i) not in ( 12, ) ):
            translated_ascii_chars = set_char( translated_ascii_chars, ord(i), i )
        
    translated_nonascii_chars = ''.join( map( lambda x: "?", range(128,256) ) )
    
    mask_nonascii_translation_table = string.maketrans( ascii_chars + nonascii_chars
                                                        , translated_ascii_chars + translated_nonascii_chars
                                                        )
    for i in range( 0, len(xml)):
        xml[i] = string.translate( xml[i], mask_nonascii_translation_table )
    output_file.writelines( xml )


def process_test_log_files( output_file, dir, names ):
    for file in names:
        if os.path.basename( file ) == "test_log.xml":
            process_xml_file( os.path.join( dir, file ), output_file )


def collect_test_logs( input_dirs, output_file ):
    __log__ = 1
    log( "Collecting test logs ..." )
    f = open( output_file, "w+" )
    f.write( "<tests>\n" );
    for input_dir in input_dirs:
        os.path.walk( input_dir, process_test_log_files, f );
    f.write( "</tests>\n" );
    f.close()


def xalan( xml_file, xsl_file,output_file, parameters = None ):
    transform_command = "xalan"
    transform_command = transform_command  + ' -o "%s" ' %  output_file
    if parameters is not None:
         for i in parameters: 
              transform_command = transform_command + ' -p %s "\'%s\'" ' % ( i, parameters[ i ] )
    transform_command = transform_command  + ' "%s"' %  xml_file
    transform_command = transform_command  + ' "%s"' %  xsl_file
    log( transform_command )
    os.system( transform_command )    
                  

def msxsl( xml_file, xsl_file, output_file, parameters = None ):
    transform_command = "msxsl"
    transform_command = transform_command  + ' "%s"' %  xml_file
    transform_command = transform_command  + ' "%s"' %  xsl_file
    transform_command = transform_command  + ' -o  "%s" ' %  output_file

    if parameters is not None:
         for i in parameters: 
              transform_command = transform_command + ' %s="%s" ' % ( i, parameters[ i ] )

    log( transform_command )
    os.system( transform_command )    

def libxslt( xml_file, xsl_file, output_file, parameters = None ):

    if sys.platform == "win32":
        os.chdir( os.path.dirname( xsl_file ) )
    transform_command = "xsltproc"
    transform_command = transform_command + ' -o ' + "%s" % output_file

    if parameters is not None:
         for i in parameters: 
             parameters[i] = parameters[i].replace( "\\", "/" )
             transform_command = transform_command + ' --param %s "\'%s\'" ' % ( i, parameters[ i ] )

    transform_command = transform_command + ' "%s" ' % xsl_file
    transform_command = transform_command + ' "%s" ' % xml_file
    log( transform_command )
    os.system( transform_command )    


registered_xsltprocs = {   "msxsl": msxsl
                         , "xalan": xalan
                         , "libxslt": libxslt
                         }

def map_path( path ):
    return os.path.join( run_dir, path ) 

def xsl_path( xsl_file_name ):
    return map_path( os.path.join( "xsl", xsl_file_name ) )

def make_result_pages( test_results_file
                       , expected_results_file
                       , failures_markup_file
                       , source
                       , run_date
                       , comment_file
                       , results_dir
                       , result_prefix
                       , xslt_proc_name
                       , reports
                       ):
    log( "Producing the reports..." )
    __log__ = 1
    
    output_dir = os.path.join( results_dir, result_prefix )
    if not os.path.exists( output_dir ):
        os.makedirs( output_dir )
        
    xslt_proc = registered_xsltprocs[ xslt_proc_name ]
    
    if comment_file != "":
        comment_file = os.path.abspath( comment_file )
        
    if expected_results_file != "":
        expected_results_file = os.path.abspath( expected_results_file )
    else:
        expected_results_file = os.path.abspath( map_path( "empty_expected_results.xml" ) )
        

    extended_test_results = os.path.join( output_dir, "extended_test_results.xml" )
    if "x" in reports:    
        log( "    Merging with expected results..." )
        xslt_proc( test_results_file
                   , xsl_path( "add_expected_results.xsl" )
                   , extended_test_results
                   , { "expected_results_file": expected_results_file, "failures_markup_file" : failures_markup_file }
                 )

    links = os.path.join( output_dir, "links.html"  )
    if "l" in reports:        
        log( "    Making -links file..." )
        xslt_proc( extended_test_results
                   , xsl_path( "links_page.xsl" )
                   , links
                   , {
                     "source": source
                     , "run_date": run_date 
                     , "comment_file": comment_file
                     , "explicit_markup_file" : failures_markup_file
                     }
                   )

    issues = os.path.join( output_dir, "issues.html"  )
    if "i" in reports:
        log( "    Making issues list..." )
        xslt_proc( extended_test_results
                   , xsl_path( "issues_page.xsl" )
                   , issues
                   , {
                     "source": source
                     , "run_date": run_date 
                     , "comment_file": comment_file
                     , "explicit_markup_file" : failures_markup_file
                     }
                   )
                   
    for mode in ( "developer", "user" ):
        if mode[0] + "d" in reports:
            log( "    Making detailed %s  report..." % mode )
            xslt_proc(  extended_test_results
                        , xsl_path( "result_page.xsl" )
                        , os.path.join( output_dir, "%s_%s" % ( mode, "result_page.html" ) )
                        , { "links_file": "links.html"
                            , "mode": mode
                            , "source": source
                            , "run_date": run_date 
                            , "comment_file": comment_file
                            , "expected_results_file": expected_results_file
                            , "explicit_markup_file" : failures_markup_file
                            }
                        );


    for mode in ( "developer", "user" ):
        if mode[0] + "s" in reports:
            log( "    Making summary %s  report..." % mode )
            xslt_proc(  extended_test_results
                        , xsl_path( "summary_page.xsl" )
                        , os.path.join( output_dir, "%s_%s" % ( mode, "summary_page.html" ) )
                        , { "mode" : mode 
                            , "source": source
                            , "run_date": run_date 
                            , "comment_file": comment_file
                            , "explicit_markup_file" : failures_markup_file
                            }
                        );

    if "e" in reports:
        log( "    Generating expected_results ..." )
        xslt_proc( extended_test_results
                   , xsl_path( "produce_expected_results.xsl" )
                   , os.path.join( output_dir, "expected_results.xml" )
                   )
    
    shutil.copyfile( xsl_path( "master.css" ),  os.path.join( output_dir, "master.css" ) )


def build_experimental_reports( locate_root_dir
                                , source
                                , expected_results_file
                                , failures_markup_file
                                , comment_file
                                , results_dir
                                , result_file_prefix
                                , xslt_proc_name
                                , dont_collect_logs = 0
                                , reports = [ "dd", "ud", "us", "ds", "l", "p", "x", "i" ]
                                ):
    ( run_date ) = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime() )
    test_results_file = os.path.join( results_dir, "test_results.xml" )
    bin_boost_dir = os.path.join( locate_root_dir, "bin", "boost" )
    print "dont_collect_logs: %s" % dont_collect_logs
    if not dont_collect_logs:
        collect_test_logs( [ os.path.join( bin_boost_dir, "libs" ), os.path.join( bin_boost_dir, "status" ) ]
                           , test_results_file
                           )

    make_result_pages( test_results_file
                       , expected_results_file
                       , failures_markup_file
                       , source
                       , run_date
                       , comment_file
                       , results_dir
                       , result_file_prefix
                       , xslt_proc_name
                       , reports
                       )


def accept_args( args ):
    ( option_pairs, rest_args ) = getopt.getopt( sys.argv[1:], "", [ "locate-root="
                                                                     , "tag="
                                                                     , "expected-results="
                                                                     , "failures-markup="
                                                                     , "comment="
                                                                     , "results-dir="
                                                                     , "results-prefix="
                                                                     , "xsltproc="
                                                                     , "dont-collect-logs"
                                                                     , "reports="
                                                                     , "help"
                                                                     ] )
    options = { "--comment": ""
                , "--expected-results": ""
                , "--failures-markup": ""
                , "--reports" : "dd,ud,us,ds,l,p,x,i" }
    
    map( lambda x: options.__setitem__( x[0], x[1] ), option_pairs )

    if ( options.has_key( "--help" ) or len( options.keys() ) == 4 ):
        usage()
        sys.exit( 1 )

    if not options.has_key( "--results-dir" ):
         options[ "--results-dir" ] = options[ "--locate-root" ]
         
    return ( options[ "--locate-root" ]
             , options[ "--tag" ]
             , options[ "--expected-results" ]
             , options[ "--failures-markup" ]
             , options[ "--comment" ]
             , options[ "--results-dir" ]
             , options[ "--results-prefix" ]
             , options[ "--xsltproc" ]
             , options.has_key( '--dont-collect-logs' )
             , options[ "--reports" ].split( "," )
             )

def usage():
    print "Usage: %s [options]" % os.path.basename( sys.argv[0] )
    print    """
\t--locate-root       the same as --locate-root in compiler_status
\t--tag               the tag for the results (i.e. "CVS main trunk")
\t--expected-results  the file with the results to be compared with
\t                    the current run
\t--failures-markup   the file with the failures markup
\t--comment           an html comment file (will be inserted in the reports)
\t--results-dir       the directory containing -links.html, -fail.html
\t                    files produced by compiler_status (by default the
\t                    same as specified in --locate-root)
\t--results-prefix    the prefix of -links.html, -fail.html
\t                    files produced by compiler_status
\t--xsltproc          the name of xslt processor (msxsl, xalan, libxslt)

\t                    The XSLT used in report generation uses exsl 
\t                    (http:///www.exsl.org). Make sure that specified 
\t                    processor supports it.

The following options are useful in debugging:

\t--dont-collect-logs dont collect the test logs
\t--reports           produce only the specified reports
\t                        us - user summary
\t                        ds - developer summary
\t                        ud - user detailed
\t                        dd - developer detailed
\t                        l  - links
\t                        p  - patches
\t                        x  - extended results file
\t                        i  - issues
    """

def main():
    apply( build_experimental_reports, accept_args( sys.argv[ 1 : ] ) )
    
if __name__ == '__main__':
    main()

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲一二三区| 日韩综合在线视频| 午夜国产不卡在线观看视频| 捆绑调教美女网站视频一区| 97精品视频在线观看自产线路二| 欧美一区二区三区婷婷月色| 中文字幕一区二区不卡| 国产一区二区三区免费在线观看| 欧美电视剧免费全集观看| 欧美国产丝袜视频| 热久久国产精品| 欧美在线视频全部完| 国产精品毛片大码女人| 国产露脸91国语对白| 3atv在线一区二区三区| 亚洲综合一二三区| 成人福利视频在线看| 久久精品欧美一区二区三区麻豆| 日韩av高清在线观看| 欧美色男人天堂| 亚洲人一二三区| 91在线观看污| 亚洲欧洲精品一区二区三区| 国产伦理精品不卡| 久久久久国色av免费看影院| 久久99精品国产91久久来源| 91精品国产综合久久精品性色| 亚洲一二三四在线观看| 色综合一个色综合亚洲| 国产精品久久久久久久久快鸭| 国产精品中文有码| 久久精品一区蜜桃臀影院| 精品一区免费av| 欧美xxx久久| 国产一区二区91| 久久综合色婷婷| 国产一区二区伦理| 日本一区二区三区电影| 东方aⅴ免费观看久久av| 国产精品视频一二三区 | 国产精品色噜噜| 国产成人av一区二区| 国产日韩精品一区| 99在线热播精品免费| 亚洲视频一区二区在线| 成人高清在线视频| 一区二区三区日韩精品视频| 欧美综合色免费| 日韩av成人高清| 久久综合九色综合97婷婷 | 国产亚洲一区二区三区四区 | 中文字幕在线不卡视频| 91天堂素人约啪| 亚洲国产综合色| 日韩欧美一级特黄在线播放| 国产又黄又大久久| 亚洲视频一区二区在线| 欧美吻胸吃奶大尺度电影| 蜜臀精品久久久久久蜜臀 | 色香蕉久久蜜桃| 日韩一区欧美二区| 国产欧美视频一区二区| 99国产精品国产精品久久| 欧美一级生活片| 99精品在线免费| 最近日韩中文字幕| 成人永久看片免费视频天堂| 中文字幕电影一区| 9色porny自拍视频一区二区| 一级中文字幕一区二区| 日韩美女主播在线视频一区二区三区| 国产99久久久精品| 亚洲综合图片区| 久久久久国产精品人| 在线视频观看一区| 国产美女娇喘av呻吟久久| 中文字幕亚洲在| 欧美一区二区三区四区在线观看| 国产91精品精华液一区二区三区| 亚洲精品日韩综合观看成人91| 91精品一区二区三区在线观看| 国内精品伊人久久久久影院对白| 亚洲精品国产无套在线观 | 国产真实乱偷精品视频免| 亚洲精品成人a在线观看| 久久久不卡影院| 欧美丰满嫩嫩电影| 在线欧美日韩国产| 国产91精品免费| 精品一区二区三区视频在线观看| 亚洲香肠在线观看| 成人欧美一区二区三区| 国产亚洲精品7777| 国产女同性恋一区二区| 欧美一区二区视频观看视频| 91精彩视频在线观看| 国产剧情在线观看一区二区| 日韩中文字幕亚洲一区二区va在线 | 亚洲日本中文字幕区| 精品国产乱码久久久久久蜜臀| 欧美日韩精品二区第二页| 成人av在线电影| 成人午夜免费视频| 国产伦精品一区二区三区在线观看| 婷婷丁香激情综合| 午夜激情一区二区三区| 亚洲一区在线电影| 亚洲乱码中文字幕| 中文字幕一区二区视频| 国产视频一区二区在线观看| 精品国产乱码久久久久久夜甘婷婷| 正在播放亚洲一区| 欧美日韩国产bt| 欧美日韩一区视频| 欧美丰满少妇xxxxx高潮对白| 欧美日韩精品欧美日韩精品一综合| 色天天综合久久久久综合片| 色系网站成人免费| 欧美色网一区二区| 69堂成人精品免费视频| 91精品在线免费观看| 精品国产免费视频| 2017欧美狠狠色| 国产精品蜜臀av| 最新不卡av在线| 亚洲韩国精品一区| 日产欧产美韩系列久久99| 免费高清不卡av| 国产精品1区2区| 91影院在线观看| 欧美人伦禁忌dvd放荡欲情| 91精品国产综合久久久蜜臀粉嫩 | 视频一区二区三区中文字幕| 日韩av电影一区| 国产大陆亚洲精品国产| 成人av在线电影| 欧美日韩精品福利| 精品国产电影一区二区| 国产精品久久久久久久久搜平片 | 亚洲欧美另类小说视频| 亚洲va欧美va人人爽| 蜜臀av性久久久久蜜臀aⅴ四虎| 久久99久久99精品免视看婷婷| 精品一区二区三区在线播放视频| 粉嫩嫩av羞羞动漫久久久| 久久久久久夜精品精品免费| 国产蜜臀97一区二区三区| 亚洲视频一区在线| 蜜臀久久99精品久久久画质超高清 | 精品亚洲成a人| 福利一区福利二区| 欧美日韩视频专区在线播放| 精品卡一卡二卡三卡四在线| 综合av第一页| 精品制服美女丁香| 色先锋资源久久综合| 久久综合国产精品| 亚洲国产精品人人做人人爽| 国产乱人伦偷精品视频免下载| 色哟哟一区二区三区| 日韩女同互慰一区二区| 亚洲黄色av一区| 国产激情偷乱视频一区二区三区| 欧美亚洲一区二区在线| 精品日产卡一卡二卡麻豆| 自拍偷拍国产精品| 韩国精品主播一区二区在线观看 | 欧美日韩一区高清| 国产三级精品在线| 日韩成人伦理电影在线观看| 99久久免费国产| 久久久午夜电影| 日产精品久久久久久久性色| 91看片淫黄大片一级在线观看| 精品播放一区二区| 婷婷国产在线综合| 91国产丝袜在线播放| 国产精品私人自拍| 国产高清精品久久久久| 欧美一区二区三区视频在线观看| 亚洲女同ⅹxx女同tv| 国产99久久久久久免费看农村| 精品久久久久一区二区国产| 亚洲福利视频一区二区| 97久久精品人人澡人人爽| 国产欧美一区二区三区在线看蜜臀 | 亚洲福利一区二区三区| 99久久久国产精品免费蜜臀| 久久亚洲精精品中文字幕早川悠里 | 国产精品久久三区| 国产成人综合视频| 久久综合久久鬼色中文字| 日韩电影一区二区三区| 欧美精品第一页| 亚洲成人精品一区| 欧美美女直播网站| 无码av免费一区二区三区试看 | 成人精品gif动图一区| 国产欧美综合在线观看第十页| 狠狠色狠狠色合久久伊人|