Пример #1
0
def execute(oai, user, pw, host, logfile,logdir,debug):
    
    case = '01'
    rv = 1
    oai.send_recv('cd $OPENAIR_TARGETS;')   
 
    try:
        test = '00'
        name = 'Check oai.svn.add'
        conf = 'svn st -q | grep makefile'
        diag = 'Makefile(s) changed. If you are adding a new file, make sure that it is added to the svn'
        rsp = oai.send_recv('svn st -q | grep -i makefile;') 
        for item in rsp.split("\n"):
            if "Makefile" in item:
                rsp2=item.strip() + '\n'
        oai.find_false_re(rsp,'Makefile')
    except log.err, e:
        diag = diag + "\n" + rsp2  
               #log.skip(case, test, name, conf, e.value, logfile)
        log.skip(case, test, name, conf, '', diag, logfile)
Пример #2
0
def execute(oai, user, pw, host, logfile, logdir, debug, timeout):

    case = "01"
    rv = 1
    oai.send_recv("cd $OPENAIR_TARGETS;")

    try:
        log.start()
        test = "00"
        name = "Check oai.svn.add"
        conf = "svn st -q | grep makefile"
        diag = "Makefile(s) changed. If you are adding a new file, make sure that it is added to the svn"
        rsp = oai.send_recv("svn st -q | grep -i makefile;")
        for item in rsp.split("\n"):
            if "Makefile" in item:
                rsp2 = item.strip() + "\n"
        oai.find_false_re(rsp, "Makefile")
    except log.err, e:
        diag = diag + "\n" + rsp2
        # log.skip(case, test, name, conf, e.value, logfile)
        log.skip(case, test, name, conf, "", diag, logfile)
Пример #3
0
                                            cmd = './dlsim.rel8.'+ host + ' ' + conf + tee
                                        
                                        if debug : 
                                            print cmd

                                        match = oai.send_expect_re(cmd, 'passed', 0, 1000)
                                      
                                        if match :
                                            #SNR[j]=q
                                            log.ok(case, str(test), name, conf, '', logfile)
                                            MIN_SNR = q -1 # just to speed up the test
                                            test+=1
                                            break # found the smallest snr
                                        else :
                                            if q == MAX_SNR -1 :
                                                log.skip(case,str(test), name, conf,'','',logfile) 
                                                test+=1
                                                break # do not remove the last log file
                                            try:  
                                                if os.path.isfile(trace) :
                                                    os.remove(trace)
                                             
                                            except OSError, e:  ## if failed, report it back to the user ##
                                                print ("Error: %s - %s." % (e.filename,e.strerror))
                                        
                                       
                                                
    except log.err, e:
        log.fail(case, str(test), name, conf, e.value, diag, logfile,trace)
    #else:
    #    log.ok(case, test, name, conf, '', logfile)