コード例 #1
0
ファイル: sr.py プロジェクト: try-dash-now/idash
 def write_report(name, suitefile, rangelist, arglist, statsTotalCase,
                  statsFail, statsPass, report, suiteStartTime,
                  suiteEndTime):
     htmlstring = array2html(suitefile, rangelist, ','.join(arglist),
                             statsTotalCase, statsFail + statsPass,
                             statsPass, statsFail,
                             statsTotalCase - statsFail - statsPass, report,
                             suiteStartTime, suiteEndTime)
     reportfilename = '../../log/%s.html' % (name)
     with open(reportfilename, 'wb') as f:
         f.write(htmlstring.encode(encoding='utf_8', errors='strict'))
コード例 #2
0
ファイル: sr.py プロジェクト: try-dash-now/idash
 def write_report(name, suitefile,rangelist, arglist, statsTotalCase,statsFail,statsPass,report, suiteStartTime, suiteEndTime):
     htmlstring = array2html(suitefile,rangelist,','.join(arglist), statsTotalCase,statsFail+statsPass,statsPass,statsFail, statsTotalCase-statsFail-statsPass,report, suiteStartTime, suiteEndTime)
     reportfilename = '../../log/%s.html'%(name)
     with open(reportfilename, 'wb') as f:
         f.write(htmlstring.encode(encoding='utf_8', errors='strict'))
コード例 #3
0
ファイル: sr.py プロジェクト: try-dash-now/idash
                break
            casename = '%d' % index
            logdir = '../../log/' + suitefile + '/' + casename
        suiteEndTime = time.time()
        write_report(name, suitefile, rangelist, arglist, statsTotalCase,
                     statsFail, statsPass, report, suiteStartTime,
                     suiteEndTime)
        #htmlstring = array2html(suitefile,rangelist,','.join(arglist), statsTotalCase,statsFail+statsPass,statsPass,statsFail, statsTotalCase-statsFail-statsPass,report, suiteStartTime, suiteEndTime, finish=True)
        #reportfilename = '../../log/%s.html'%(name)
        #with open(reportfilename, 'wb') as f:
        #    f.write(htmlstring.encode(encoding='utf_8', errors='strict'))
    except KeyboardInterrupt:
        try:
            print('Pass:'******'Fail', statsFail)
            suiteEndTime = time.time()
            htmlstring = array2html(suitefile, rangelist, ','.join(arglist),
                                    statsTotalCase, statsFail + statsPass,
                                    statsPass, statsFail,
                                    statsTotalCase - statsFail - statsPass,
                                    report, suiteStartTime, suiteEndTime)
            reportfilename = '../../log/%s.html' % (name)
        except:
            pass

    #if dut_pool.__len__()!={}:
    releaseDUTs(dut_pool, suite_logger)

    print('#' * 80)
    print('Pass:'******'Fail', statsFail)
    os._exit(0)
コード例 #4
0
ファイル: sr.py プロジェクト: try-dash-now/idash
            if breakFlag:
                break
            casename='%d'%index
            logdir ='../../log/'+suitefile+'/'+casename
        suiteEndTime = time.time()
        write_report(name,  suitefile,rangelist, arglist, statsTotalCase,statsFail,statsPass,report, suiteStartTime, suiteEndTime)
        #htmlstring = array2html(suitefile,rangelist,','.join(arglist), statsTotalCase,statsFail+statsPass,statsPass,statsFail, statsTotalCase-statsFail-statsPass,report, suiteStartTime, suiteEndTime, finish=True)
        #reportfilename = '../../log/%s.html'%(name)
        #with open(reportfilename, 'wb') as f:
        #    f.write(htmlstring.encode(encoding='utf_8', errors='strict'))
    except KeyboardInterrupt:
        try:
            print('Pass:'******'Fail', statsFail)
            suiteEndTime = time.time()
            htmlstring = array2html(suitefile,rangelist,','.join(arglist), statsTotalCase,statsFail+statsPass,statsPass,statsFail, statsTotalCase-statsFail-statsPass,report, suiteStartTime, suiteEndTime)
            reportfilename = '../../log/%s.html'%(name)
        except:
            pass





    #if dut_pool.__len__()!={}:
    releaseDUTs(dut_pool, suite_logger)

    print('#'*80)
    print('Pass:'******'Fail', statsFail)
    os._exit(0)