def testRegression::AddLogStatusDB | ( | label, | |
runID, | |||
logStr | |||
) |
Definition at line 313 of file testRegression.py.
def testRegression::BuildLogfile | ( | label, | |
runID | |||
) |
Definition at line 188 of file testRegression.py.
def testRegression::CheckIfOkStatusDB | ( | runID, | |
label | |||
) |
Definition at line 319 of file testRegression.py.
00320 : 00321 curs = conn.cursor() 00322 sqlstr = "SELECT ID FROM TEST_STATUS WHERE RUNID = :rid AND LABEL = :labl" 00323 curs.prepare(sqlstr) 00324 curs.execute(sqlstr, rid = runID, labl = label) 00325 idList = [] 00326 for row in curs: 00327 idList.append(row[0]) 00328 curs = conn.cursor() 00329 sqlstr = "SELECT ID, STATUS FROM TEST_RESULTS WHERE ID >= :mi AND ID <= :ma AND LABEL = :labl" 00330 curs.prepare(sqlstr) 00331 #print "ID = %d label=%s minid=%d maxid=%d" %(runID,label, min(idList),max(idList)) 00332 curs.execute(sqlstr, mi=min(idList), ma=max(idList), labl = label) 00333 for row in curs: 00334 if row[1] != 0: 00335 return False 00336 return True
def testRegression::CheckLabelSequenceDB | ( | label | ) |
Definition at line 396 of file testRegression.py.
def testRegression::CheckPath | ( | release, | |
arch, | |||
path | |||
) |
Definition at line 633 of file testRegression.py.
00634 : 00635 if(os.path.exists(path)): 00636 if(os.path.exists(os.path.join(path, release))): 00637 if(os.path.exists(os.path.join(path, release, "test", arch))): 00638 return True 00639 else: 00640 print "Architecture not found" 00641 return False 00642 else: 00643 print "Release not found" 00644 return False 00645 else: 00646 print "Path not found" return False
def testRegression::CmdUsage | ( | ) |
Definition at line 624 of file testRegression.py.
00625 : 00626 print "Command line arguments :" 00627 print "-c (-s) creates descriptor(status) db schema" 00628 print "-d drops descriptor(status) db schema. Optional : -R [release] -A [arch] to drop single entry (for descriptor db)" 00629 print "-w writes data to db. Goes only with -R [release] -A [arch] -P [path]" 00630 print "-r (-s) reads contents of descriptor(status) db" 00631 print "-t (-o) (-i) runs test. Goes only with -L [label] -R [release] -A [arch] -P [path] " 00632 print "(-o) specifies reference release. supply additional parameters --R [refRelease] --A [refArch] --P [refPath]" print "(-i) argument forces candidate to test with itself as a reference"
def testRegression::Command | ( | runStr | ) |
Definition at line 540 of file testRegression.py.
00541 : 00542 cmds = """ 00543 if [ $RETVAL = 0 ]; then 00544 echo "Executing Command """+runStr+""" " 00545 echo "with $TRELEASE $TARCH :" 00546 """+runStr+""" 00547 RETVAL=$? 00548 if [ $RETVAL != 0 ]; then 00549 echo "Task failed on $TRELEASE $TARCH return code : $RETVAL" 00550 else 00551 echo "Task performed successfully" 00552 fi 00553 fi 00554 """ return cmds
def testRegression::CreateReleaseDB | ( | ) |
Definition at line 220 of file testRegression.py.
def testRegression::CreateResultsDB | ( | ) |
Definition at line 337 of file testRegression.py.
00337 : 00338 curs = conn.cursor() 00339 sqlstr = "CREATE TABLE TEST_RESULTS (RID NUMBER, ID NUMBER, LABEL VARCHAR(20), NAME VARCHAR(100), STATUS NUMBER)" 00340 curs.prepare(sqlstr) 00341 curs.execute(sqlstr) 00342 sqlstr = "CREATE SEQUENCE AUTO_INC INCREMENT BY 1 START WITH 1" 00343 curs.prepare(sqlstr) 00344 curs.execute(sqlstr) 00345 conn.commit()
def testRegression::CreateSequenceDB | ( | ) |
Definition at line 378 of file testRegression.py.
def testRegression::CreateStatusDB | ( | ) |
Definition at line 249 of file testRegression.py.
00250 : 00251 curs = conn.cursor() 00252 sqlstr = "CREATE TABLE TEST_STATUS (ID NUMBER, RUNID NUMBER, RDATE DATE, LABEL VARCHAR2(20), " 00253 sqlstr += "T_RELEASE VARCHAR2(50), T_ARCH VARCHAR2(30), R_RELEASE VARCHAR(50), R_ARCH VARCHAR2(30), LOG CLOB, " 00254 sqlstr += "CONSTRAINT PK_ID2 PRIMARY KEY(ID, RUNID, LABEL))" 00255 curs.prepare(sqlstr) 00256 curs.execute(sqlstr) 00257 CreateResultsDB() 00258 CreateSequenceDB() 00259 conn.commit() print 'STATUS TABLE CREATED'
def testRegression::DeleteReleaseDB | ( | release, | |
arch | |||
) |
Definition at line 232 of file testRegression.py.
def testRegression::DropReleaseDB | ( | ) |
Definition at line 226 of file testRegression.py.
def testRegression::DropResultsDB | ( | ) |
Definition at line 346 of file testRegression.py.
def testRegression::DropSequenceDB | ( | ) |
Definition at line 404 of file testRegression.py.
def testRegression::DropStatusDB | ( | ) |
Definition at line 260 of file testRegression.py.
def testRegression::extractErr | ( | runID, | |
stdoutStr | |||
) |
Definition at line 208 of file testRegression.py.
00209 : 00210 reStr = "\!L\!([^!]+)\!TR\!([^!]+)\!TA\!([^!]+)\!RR\!([^!]+)\!RA\!([^!]+)" 00211 for i in range (0, resCount): 00212 reStr += "\!C"+str(i)+"\!(\d+)" 00213 00214 pattern = re.compile(reStr) 00215 matching = pattern.findall(stdoutStr) 00216 stdoutMod = pattern.sub("", stdoutStr) 00217 for match in matching: 00218 WriteStatusDB(runID, match) 00219 return stdoutMod
def testRegression::extractID | ( | release | ) |
Definition at line 193 of file testRegression.py.
00194 : 00195 pattern = re.compile("^CMSSW_(\d+)_(\d+)_(\d+|\D)(_pre(\d+)|_patch(\d+))?") 00196 matching = pattern.match(release) 00197 version = 0 00198 if matching: 00199 g = matching.groups() 00200 if(g[2].isdigit()): 00201 if(g[4] is not None and g[4].isdigit()): 00202 version = int(g[0]) * 1000000 + int(g[1]) * 10000 + int(g[2]) * 100 + int(g[4]) 00203 else: 00204 version = int(g[0]) * 1000000 + int(g[1]) * 10000 + int(g[2]) * 100 00205 else: 00206 version = int(g[0]) * 1000000 + int(g[1]) * 10000 +9999 00207 if(version is not None): return version
def testRegression::extractLogin | ( | login | ) |
Definition at line 82 of file testRegression.py.
def testRegression::GetAutoIncResultsDB | ( | ) |
Definition at line 370 of file testRegression.py.
def testRegression::GetDate | ( | ) |
Definition at line 447 of file testRegression.py.
def testRegression::getLogin | ( | auth, | |
connStr | |||
) |
Definition at line 89 of file testRegression.py.
def testRegression::GetMaxRunIDStatusDB | ( | label | ) |
Definition at line 280 of file testRegression.py.
def testRegression::getText | ( | nodelist | ) |
Definition at line 25 of file testRegression.py.
def testRegression::NextIDVal | ( | label | ) |
Definition at line 410 of file testRegression.py.
00411 : 00412 curs = conn.cursor() 00413 sqlstr = "SELECT ID FROM SEQUENCES WHERE LABEL = :labl FOR UPDATE" 00414 curs.prepare(sqlstr) 00415 curs.execute(sqlstr, labl=label) 00416 maxID = 0 00417 for row in curs: 00418 maxID = row[0] 00419 maxID += 1 00420 sqlstr = "UPDATE SEQUENCES SET ID = :maxid WHERE LABEL = :labl" 00421 curs.prepare(sqlstr) 00422 curs.execute(sqlstr, maxid = maxID, labl=label) 00423 conn.commit() 00424 curs = conn.cursor() 00425 sqlstr = "SELECT ID FROM SEQUENCES WHERE LABEL = :labl" 00426 curs.prepare(sqlstr) 00427 curs.execute(sqlstr, labl=label) 00428 for row in curs: return row[0]
def testRegression::NextRunIDVal | ( | label | ) |
Definition at line 429 of file testRegression.py.
00430 : 00431 curs = conn.cursor() 00432 sqlstr = "SELECT RUNID FROM SEQUENCES WHERE LABEL = :labl" 00433 curs.prepare(sqlstr) 00434 curs.execute(sqlstr, labl=label) 00435 maxID = 0 00436 for row in curs: 00437 maxID = row[0] 00438 maxID += 1 00439 sqlstr = "UPDATE SEQUENCES SET RUNID = :maxid" 00440 curs.prepare(sqlstr) 00441 curs.execute(sqlstr, maxid = maxID) 00442 sqlstr = "SELECT RUNID FROM SEQUENCES WHERE LABEL = :labl" 00443 curs.prepare(sqlstr) 00444 curs.execute(sqlstr, labl=label) 00445 for row in curs: 00446 return row[0]
def testRegression::ParseXML | ( | filename, | |
label | |||
) |
Definition at line 31 of file testRegression.py.
00032 : 00033 results = [] 00034 initResults = [] 00035 finalResults = [] 00036 dom = parse(filename) 00037 xml = dom.getElementsByTagName("xml") 00038 execTest = False 00039 env = [] 00040 if xml != None: 00041 for xm in xml: 00042 test = xm.getElementsByTagName("test") 00043 for it in test: 00044 #print it.toxml() 00045 if "name" in it.attributes.keys(): 00046 tLabel = str(it.attributes["name"].value) 00047 if tLabel == label: 00048 execTest = True 00049 global mLabel 00050 mLabel = label 00051 if execTest == True: 00052 inits = it.getElementsByTagName("init") 00053 finals = it.getElementsByTagName("final") 00054 seqs = it.getElementsByTagName("sequence") 00055 for init in inits: 00056 commands = init.getElementsByTagName("command") 00057 for command in commands: 00058 if "exec" in command.attributes.keys(): 00059 initResults.append(str(command.attributes["exec"].value)) 00060 if "env" in command.attributes.keys(): 00061 env.append(str(command.attributes["env"].value)) 00062 for seq in seqs: 00063 commands = seq.getElementsByTagName("command") 00064 for command in commands: 00065 if "exec" in command.attributes.keys(): 00066 results.append(str(command.attributes["exec"].value)) 00067 if "result" in command.attributes.keys(): 00068 global resNames 00069 resNames.append(str(command.attributes["result"].value)) 00070 else: 00071 resNames.append("%NONE") 00072 if "env" in command.attributes.keys(): 00073 env.append(str(command.attributes["env"].value)) 00074 for final in finals: 00075 commands = final.getElementsByTagName("command") 00076 for command in commands: 00077 if "exec" in command.attributes.keys(): 00078 finalResults.append(str(command.attributes["exec"].value)) 00079 if "env" in command.attributes.keys(): 00080 env.append(str(command.attributes["env"].value)) 00081 execTest = False return initResults,results, finalResults, env
def testRegression::ReadArgs | ( | ) |
Definition at line 647 of file testRegression.py.
00648 : 00649 try: 00650 opts, args = getopt.getopt(sys.argv[1:], "cdwrthsoiL:R:A:P:", ['R=', 'A=', 'P=']) 00651 except getopt.GetoptError, err: 00652 # print help information and exit: 00653 print str(err) # will print something like "option -a not recognized" 00654 CmdUsage() 00655 sys.exit(2) 00656 RELEASE = None 00657 ARCH = None 00658 PATH = None 00659 REF_RELEASE = None 00660 REF_ARCH = None 00661 REF_PATH = None 00662 LABEL = None 00663 wflag = False 00664 tflag = False 00665 dflag = False 00666 sflag = False 00667 cflag = False 00668 rflag = False 00669 oflag = False 00670 iflag = False 00671 cmds = "" 00672 for o, a in opts: 00673 if o == "-c": 00674 cflag = True 00675 elif o == "-d": 00676 dflag = True 00677 elif o == "-w": 00678 wflag = True 00679 elif o == "-r": 00680 rflag = True 00681 elif o == "-t": 00682 tflag = True 00683 elif o == "-s": 00684 sflag = True 00685 elif o == "-o": 00686 oflag = True 00687 elif o == "-i": 00688 iflag = True 00689 elif o == "-L": 00690 LABEL = a 00691 elif o == "-R": 00692 RELEASE = a 00693 elif o == "-A": 00694 ARCH = a 00695 elif o == "-P": 00696 PATH = a 00697 elif o in ("-K", "--R"): 00698 REF_RELEASE = a 00699 elif o in ("-L", "--A"): 00700 REF_ARCH = a 00701 elif o in ("-M", "--P"): 00702 REF_PATH = a 00703 elif o == "-h": 00704 CmdUsage() 00705 else: 00706 assert False, "unhandled option" 00707 if(cflag == True): 00708 if(sflag == True): 00709 CreateStatusDB() 00710 else: 00711 CreateReleaseDB() 00712 if(rflag == True): 00713 if(sflag == True): 00714 ReadStatusDB() 00715 else: 00716 ReadReleaseDB() 00717 if(wflag == True): 00718 if(RELEASE != None and ARCH != None and PATH != None): 00719 WriteReleaseDB(RELEASE, ARCH, PATH) 00720 else: 00721 print "Bad arguments for -w" 00722 if(dflag == True): 00723 if(sflag == True): 00724 DropStatusDB(); 00725 else: 00726 if(RELEASE != None and ARCH != None): 00727 DeleteReleaseDB(RELEASE, ARCH) 00728 else: 00729 DropReleaseDB(); 00730 if(tflag == True): 00731 if LABEL != None : 00732 global pResults, iResults, fResults, setEnvs 00733 iResults,pResults, fResults , setEnvs = ParseXML("sequences.xml", LABEL) 00734 if(iResults == None or pResults == None or fResults == None): 00735 print "Error : sequences.xml reading failed!" 00736 if(RELEASE != None and ARCH != None and PATH != None): 00737 if(oflag == True): 00738 if(REF_RELEASE != None and REF_ARCH != None and REF_PATH != None): 00739 if(CheckPath(RELEASE, ARCH, PATH) == True): 00740 if(CheckPath(REF_RELEASE, REF_ARCH, REF_PATH) == True): 00741 cmds=TestCompatRef(LABEL, RELEASE, ARCH, PATH, REF_RELEASE, REF_ARCH, REF_PATH) 00742 else : 00743 print "Bad reference release arguments" 00744 else : 00745 print "Bad test release arguments" 00746 else: 00747 print "Bad arguments for -t" 00748 else: 00749 if(CheckPath(RELEASE, ARCH, PATH) == True): 00750 cmds = '' 00751 if iflag == True: 00752 cmds += TestCompatRef(LABEL, RELEASE, ARCH, PATH, RELEASE, ARCH, PATH) 00753 cmds += TestCompat(LABEL, RELEASE, ARCH, PATH) 00754 else : 00755 print "Bad test release arguments" 00756 else: 00757 print "Bad arguments for -t" 00758 return (cmds, LABEL)
def testRegression::ReadCurrentStatusDB | ( | runID | ) |
Definition at line 290 of file testRegression.py.
00291 : 00292 curs = conn.cursor() 00293 sqlstr = "SELECT ID, RUNID, TO_CHAR(RDATE, 'DD.MM.YYYY HH24:MI:SS'), LABEL, T_RELEASE, T_ARCH, R_RELEASE, R_ARCH " 00294 sqlstr +="FROM TEST_STATUS WHERE RUNID = :rid ORDER BY ID" 00295 curs.prepare(sqlstr) 00296 curs.execute(sqlstr, rid= runID) 00297 print 'STATUS TABLE READ' 00298 print 'ID RUNID RDATE LABEL T_RELEASE T_ARCH R_RELEASE R_ARCH' 00299 for row in curs: 00300 print row print ReadResultsDB(row[0])
def testRegression::ReadReleaseDB | ( | ) |
Definition at line 239 of file testRegression.py.
def testRegression::ReadResultsDB | ( | id | ) |
Definition at line 362 of file testRegression.py.
def testRegression::ReadSequenceDB | ( | label | ) |
Definition at line 389 of file testRegression.py.
def testRegression::ReadStatusDB | ( | ) |
Definition at line 268 of file testRegression.py.
00269 : 00270 curs = conn.cursor() 00271 sqlstr = "SELECT ID, RUNID, TO_CHAR(RDATE, 'DD.MM.YYYY HH24:MI:SS'), LABEL, T_RELEASE, T_ARCH, R_RELEASE, R_ARCH, LOG " 00272 sqlstr +="FROM TEST_STATUS ORDER BY ID" 00273 curs.prepare(sqlstr) 00274 curs.execute(sqlstr) 00275 print 'STATUS TABLE READ' 00276 print 'ID RUNID RDATE LABEL T_RELEASE T_ARCH R_RELEASE R_ARCH' 00277 for row in curs: 00278 print row[0:8] 00279 print ReadResultsDB(row[0]) print row[8].read()
def testRegression::RunTest | ( | label, | |
release, | |||
arch, | |||
path, | |||
refRelease, | |||
refArch, | |||
refPath | |||
) |
Definition at line 555 of file testRegression.py.
00556 : 00557 cmds =""" 00558 RETVAL=0 00559 echo "*****************************************************************************************" 00560 echo "Reference release: """+refRelease+""" " 00561 echo "Arch: """+refArch+""" " 00562 echo "Path: """+refPath+""" " 00563 echo "*****************************************************************************************" 00564 """ 00565 nr = 0 00566 enr = 0 00567 envType = 0 00568 print "init" 00569 for res in iResults: 00570 cmds += """ 00571 echo "===============================================" 00572 """ 00573 print res 00574 if setEnvs[enr] == "ref" and envType != 1: 00575 cmds += SetEnv(refRelease, refArch,refPath) 00576 envType = 1 00577 elif setEnvs[enr] == "cand" and envType != 2: 00578 cmds += SetEnv(release, arch, path) 00579 envType = 2 00580 cmds +=Command(res) 00581 enr +=1 00582 print "cmd" 00583 for res in pResults: 00584 cmds += """ 00585 echo "===============================================" 00586 """ 00587 print res 00588 if setEnvs[enr] == "ref" and envType != 1: 00589 cmds += SetEnv(refRelease, refArch,refPath) 00590 envType = 1 00591 elif setEnvs[enr] == "cand" and envType != 2: 00592 cmds += SetEnv(release, arch, path) 00593 envType = 2 00594 cmds +=Command(res) 00595 cmds += 'RCODE['+str(nr)+']=$RETVAL' 00596 nr +=1 00597 enr +=1 00598 print "final" 00599 cmds += """ 00600 RETVAL=0 00601 """ 00602 for res in fResults: 00603 cmds += """ 00604 echo "===============================================" 00605 """ 00606 print res 00607 if setEnvs[enr] == "ref" and envType != 1: 00608 cmds += SetEnv(refRelease, refArch,refPath) 00609 envType = 1 00610 elif setEnvs[enr] == "cand" and envType != 2: 00611 cmds += SetEnv(release, arch, path) 00612 envType = 2 00613 cmds +=Command(res) 00614 enr +=1 00615 global resCount 00616 resCount = nr 00617 cmds += """ 00618 echo "===============================================" 00619 echo "Script return code : ${RCODE[1]}" 00620 echo "!L!"""+label+"""!TR!"""+release+"""!TA!"""+arch+"""!RR!"""+refRelease+"""!RA!"""+refArch 00621 for i in range (0, nr): 00622 cmds+= "!C"+str(i)+"!${RCODE["+str(i)+"]}" 00623 cmds += "\"" return cmds
def testRegression::setConn | ( | ) |
Definition at line 97 of file testRegression.py.
00098 : 00099 os.environ['TNS_ADMIN'] = "/afs/cern.ch/project/oracle/admin" 00100 coralConnStr = "oracle://"+DATABASE+"/"+USERNAME+"" 00101 PASSWORD = getLogin(AUTH_PATH, coralConnStr) 00102 conn_string = str(USERNAME+"/"+PASSWORD+"@"+DATABASE) 00103 conn = cx_Oracle.connect(conn_string) return {'r0':conn, 'r1':coralConnStr, 'r2':USERNAME, 'r3':PASSWORD, 'r4':AUTH_PATH}
def testRegression::SetEnv | ( | release, | |
arch, | |||
path | |||
) |
Definition at line 496 of file testRegression.py.
00497 : 00498 random.seed() 00499 srcPath = os.path.join(path, release,"src") 00500 cmds = """ 00501 if [ $RETVAL = 0 ]; then 00502 echo "Setting environment variables for """+release+""" """+arch+""" " 00503 echo "path : """+path+"""" 00504 eval pushd """+srcPath+""" 00505 RETVAL=$? 00506 if [ $RETVAL = 0 ]; then 00507 export SCRAM_ARCH="""+arch+""" 00508 RETVAL=$? 00509 if [ $RETVAL = 0 ]; then 00510 eval `scram runtime -sh` 00511 RETVAL=$? 00512 if [ $RETVAL = 0 ]; then 00513 export TNS_ADMIN=/afs/cern.ch/project/oracle/admin 00514 RETVAL=$? 00515 if [ $RETVAL = 0 ]; then 00516 eval popd 00517 RETVAL=$? 00518 fi 00519 fi 00520 fi 00521 TRELEASE="""+release+""" 00522 TARCH="""+arch+""" 00523 TPATH="""+path+""" 00524 TMAPNAME="""+release+"""_"""+arch+""" 00525 TMAINDB="""+coralConnStr+""" 00526 TAUXDB="""+"oracle://cms_orcoff_prep/CMS_COND_WEB"+""" 00527 TUSERNAME="""+USERNAME+""" 00528 TPASSWORD="""+PASSWORD+""" 00529 TTEST=$LOCALRT/test/$TARCH 00530 TBIN=$LOCALRT/bin/$TARCH 00531 TAUTH="""+AUTH_PATH+""" 00532 TSEED="""+str(random.randrange(1, 10))+""" 00533 echo "Environment variables set successfully" 00534 else 00535 echo "Setting environment failed on """+release+""" """+arch+""" return code : $RETVAL" 00536 fi 00537 fi 00538 echo "----------------------------------------------" 00539 """ return cmds
def testRegression::TestCompat | ( | label, | |
release, | |||
arch, | |||
path | |||
) |
Definition at line 454 of file testRegression.py.
00455 : 00456 relID = extractID(release) 00457 print "Testing exec "+label+" "+release+" "+arch+" from " 00458 print path+" : " 00459 curs = conn.cursor() 00460 cmds = """ 00461 echo "" 00462 echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" 00463 echo "Candidate release: """+release+""" " 00464 echo "Arch: """+arch+""" " 00465 echo "Path: """+path+""" " 00466 echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" 00467 """ 00468 sqlstr = "SELECT RELEASE, ARCH, PATH FROM VERSION_TABLE WHERE ID < :rid" 00469 curs.prepare(sqlstr) 00470 curs.execute(sqlstr, rid = relID) 00471 for row in curs: 00472 cmds += RunTest(label, release, arch, path, row[0], row[1], row[2]) return cmds
def testRegression::TestCompatRef | ( | label, | |
release, | |||
arch, | |||
path, | |||
refRelease, | |||
refArch, | |||
refPath | |||
) |
Definition at line 473 of file testRegression.py.
00474 : 00475 relID = extractID(release) 00476 print "Testing "+release+" "+arch+" from " 00477 print path+" : " 00478 curs = conn.cursor() 00479 cmds = """ 00480 echo "" 00481 echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" 00482 echo "Candidate release: """+release+""" " 00483 echo "Arch: """+arch+""" " 00484 echo "Path: """+path+""" " 00485 echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" 00486 """ 00487 cmds += RunTest(label, release, arch, path, refRelease, refArch, refPath) return cmds
def testRegression::WebLabels | ( | ) |
Definition at line 125 of file testRegression.py.
def testRegression::WebReadLogStatusDB | ( | label, | |
runID | |||
) |
Definition at line 179 of file testRegression.py.
def testRegression::WebReleasesHeaders | ( | label, | |
release = "" , |
|||
arch = "" |
|||
) |
Definition at line 161 of file testRegression.py.
00162 : 00163 result = setConn() 00164 con = result.get('r0') 00165 curs = con.cursor() 00166 if(release != "" and arch != ""): 00167 sqlstr = "SELECT DISTINCT RUNID, TO_CHAR(RDATE, 'DD.MM.YYYY HH24:MI:SS'), LABEL, T_RELEASE, T_ARCH FROM TEST_STATUS WHERE T_RELEASE = :rel AND T_ARCH = :arc AND LABEL = :labl ORDER BY RUNID DESC" 00168 curs.prepare(sqlstr) 00169 curs.execute(sqlstr, rel=release, arc=arch, labl=label) 00170 elif(release != ""): 00171 sqlstr = "SELECT DISTINCT RUNID, TO_CHAR(RDATE, 'DD.MM.YYYY HH24:MI:SS'), LABEL, T_RELEASE, T_ARCH FROM TEST_STATUS WHERE T_RELEASE = :rel AND LABEL = :labl ORDER BY RUNID DESC" 00172 curs.prepare(sqlstr) 00173 curs.execute(sqlstr, rel=release, labl=label) 00174 elif(arch != ""): 00175 sqlstr = "SELECT DISTINCT RUNID, TO_CHAR(RDATE, 'DD.MM.YYYY HH24:MI:SS'), LABEL, T_RELEASE, T_ARCH FROM TEST_STATUS WHERE T_ARCH = :arc AND LABEL = :labl ORDER BY RUNID DESC" 00176 curs.prepare(sqlstr) 00177 curs.execute(sqlstr, arc=arch, labl=label) 00178 result = curs.fetchall() return result
def testRegression::WebResultsList | ( | runID, | |
label | |||
) |
Definition at line 144 of file testRegression.py.
00145 : 00146 result = setConn() 00147 con = result.get('r0') 00148 curs = con.cursor() 00149 sqlstr = "SELECT ID FROM TEST_STATUS WHERE RUNID = :rid AND LABEL = :labl" 00150 curs.prepare(sqlstr) 00151 curs.execute(sqlstr, rid = runID, labl = label) 00152 idList = [] 00153 for row in curs: 00154 idList.append(row[0]) 00155 sqlstr = "SELECT ID, STATUS, NAME FROM TEST_RESULTS WHERE ID >= :mi AND ID <= :ma AND LABEL = :labl" 00156 curs.prepare(sqlstr) 00157 curs.execute(sqlstr, mi=min(idList), ma=max(idList), labl = label) 00158 result = curs.fetchall() 00159 count = len(result)/len(idList) 00160 print count return result, count
def testRegression::WebStatus | ( | id, | |
label | |||
) |
Definition at line 134 of file testRegression.py.
00135 : 00136 result = setConn() 00137 con = result.get('r0') 00138 curs = con.cursor() 00139 sqlstr = "SELECT ID, R_RELEASE, R_ARCH FROM TEST_STATUS WHERE RUNID = :ids AND LABEL = :labl ORDER BY R_RELEASE" 00140 curs.prepare(sqlstr) 00141 curs.execute(sqlstr, ids=id, labl=label) 00142 result = curs.fetchall() 00143 return result
def testRegression::WebStatusHeaders | ( | label | ) |
Definition at line 114 of file testRegression.py.
00115 : 00116 result = setConn() 00117 con = result.get('r0') 00118 curs = con.cursor() 00119 sqlstr = "SELECT DISTINCT RUNID, TO_CHAR(RDATE, 'DD.MM.YYYY HH24:MI:SS'), LABEL, T_RELEASE, T_ARCH " 00120 sqlstr +="FROM TEST_STATUS WHERE LABEL = :labl ORDER BY RUNID DESC" 00121 curs.prepare(sqlstr) 00122 curs.execute(sqlstr, labl = label) 00123 result = curs.fetchall() 00124 return result
def testRegression::WebStatusRunID | ( | label | ) |
Definition at line 104 of file testRegression.py.
def testRegression::WriteReleaseDB | ( | release, | |
arch, | |||
path | |||
) |
Definition at line 488 of file testRegression.py.
00489 : 00490 curs = conn.cursor() 00491 relID = extractID(release) 00492 print "relID "+str(relID) 00493 sqlstr = "INSERT INTO VERSION_TABLE(ID, RELEASE, ARCH, PATH) VALUES(:rid, :rel, :arc, :pat)" 00494 curs.execute(sqlstr, rid = relID, rel = release, arc = arch, pat = path) 00495 conn.commit() print 'TABLE WRITTEN'
def testRegression::WriteResultsDB | ( | id, | |
label, | |||
name, | |||
status | |||
) |
Definition at line 355 of file testRegression.py.
00356 : 00357 curs = conn.cursor() 00358 sqlstr = "INSERT INTO TEST_RESULTS(RID, ID, LABEL, NAME, STATUS)" 00359 sqlstr +="VALUES(:rid, :ids, :labl, :nam, :stat)" 00360 curs.prepare(sqlstr) 00361 curs.execute(sqlstr, rid = GetAutoIncResultsDB(), ids = id, labl = label, nam = name, stat = status) conn.commit()
def testRegression::WriteSequenceDB | ( | label | ) |
Definition at line 384 of file testRegression.py.
def testRegression::WriteStatusDB | ( | runID, | |
match | |||
) |
Definition at line 301 of file testRegression.py.
00302 : 00303 curs = conn.cursor() 00304 id = NextIDVal(match[0]) 00305 sqlstr = "INSERT INTO TEST_STATUS(ID, RUNID, RDATE, LABEL, T_RELEASE, T_ARCH, R_RELEASE, R_ARCH)" 00306 sqlstr +="VALUES(:ids, :rid, :ts, :labl, " 00307 sqlstr +=":trel, :tarc, :rrel, :rarc)" 00308 curs.prepare(sqlstr) 00309 curs.execute(sqlstr, ids = id , rid = runID, ts=timeStamp, labl=match[0], trel = match[1], tarc = match[2], rrel = match[3], rarc = match[4]) 00310 conn.commit() 00311 for i in range(5, len(match)): 00312 if resNames[i-5] != "%NONE": WriteResultsDB(id, label, resNames[i-5], match[i])
string testRegression::AUTH_PATH = "/afs/cern.ch/cms/DB/conddb/test/authentication.xml" |
Definition at line 22 of file testRegression.py.
string testRegression::DATABASE = "cms_orcoff_prep" |
Definition at line 20 of file testRegression.py.
string testRegression::mLabel = '' |
Definition at line 19 of file testRegression.py.
tuple testRegression::pipe = subprocess.Popen(cmdList, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
Definition at line 771 of file testRegression.py.
int testRegression::resCount = 0 |
Definition at line 17 of file testRegression.py.
list testRegression::resNames = [] |
Definition at line 18 of file testRegression.py.
tuple testRegression::result = setConn() |
Definition at line 759 of file testRegression.py.
tuple testRegression::runID = 0 |
Definition at line 765 of file testRegression.py.
Referenced by L1GtUtils::getL1GtRunCache(), edm::postIndexIntoFilePrintEventsInLumis(), edm::preIndexIntoFilePrintEventsInLumis(), and DQMRootSource::readRun_().
string testRegression::stat = "SUCCESS" |
Definition at line 781 of file testRegression.py.
Referenced by DTSectColl::addTU(), CSCTFAnalyzer::analyze(), L1GctPrintLuts::analyze(), L1TCSCTF::analyze(), L1MuDTEtaProcessor::assign(), DTRunConditionVar::beginJob(), DTTriggerEfficiencyTask::beginRun(), DTLocalTriggerTask::beginRun(), DTLocalTriggerBaseTask::beginRun(), DTTriggerEfficiencyTest::beginRun(), DTLocalTriggerEfficiencyTest::beginRun(), CSCTriggerPrimitivesBuilder::build(), StormStorageMaker::check(), StormLcgGtStorageMaker::check(), RFIOStorageMaker::check(), LocalStorageMaker::check(), stor::utils::checkDirectory(), stor::FileHandler::checkFileSizeMatch(), HcalDetDiagLEDMonitor::CheckStatus(), HcalDetDiagPedestalMonitor::CheckStatus(), pos::PixelROCStatus::clear(), DTSectCollThCand::CoarseSync(), L1MuGMTMatrix< T >::colAny(), MuonDTSeedFromRecHits::computePtWithVtx(), EcalUncalibRecHitRatioMethodAlgo< C >::computeTime(), CSCTriggerPrimitivesBuilder::CSCTriggerPrimitivesBuilder(), DQMFileSaver::DQMFileSaver(), DTRunConditionVarClient::endRun(), SiStripDetVOffBuilder::FileExists(), MuonShowerInformationFiller::fillHitsByStation(), LocalFileSystem::findCachePath(), pos::PixelROCStatus::get(), MatacqProducer::getCalibTriggerType(), LaserSorter::getDetailedTriggerType(), WatcherStreamFileReader::getInputFile(), reco::HitPattern::getRPCLayer(), L1MuDTAssignmentUnit::getTSphi(), metsig::SignAlgoResolutions::initializeJetResolutions(), reco::HitPattern::innermostMuonStationWithHits(), LocalFileSystem::isLocalPath(), L1MuDTAddressArray::L1MuDTAddressArray(), LaserSorter::LaserSorter(), main(), FileToolKit::MakeDir(), pos::PixelConfigFile::makeNewVersion(), MatacqProducer::mcheck(), MatacqProducer::msize(), L1MuDTAddressArray::operator!=(), operator<<(), L1MuDTAddressArray::operator=(), L1MuDTAddressArray::operator==(), reco::HitPattern::outermostMuonStationWithHits(), evf::iDie::perLumiFileSaver(), evf::Vulture::prowling(), PileUpProducer::read(), NuclearInteractionSimulator::read(), L1MuDTEtaProcessor::receiveData(), L1MuDTAddressArray::reset(), LaserSorter::restoreStreamsOfLumiBlock(), L1MuGMTMatrix< T >::rowAny(), L1MuDTWedgeSorter::run(), DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTTriggerEfficiencyTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), DTTriggerLutTest::runClientDiagnostic(), DTLocalTriggerTest::runClientDiagnostic(), L1MuDTWedgeSorter::runCOL(), pos::PixelROCStatus::set(), HcalDetDiagPedestalData::set_statistics(), HcalDetDiagLaserData::set_statistics(), HcalDetDiagLaserData::set_statistics1(), CSCTriggerPrimitivesBuilder::setConfigParameters(), CalibCoeff::setStatus(), File::size(), LocalFileSystem::statFSInfo(), LaserSorter::streamFileName(), L1MuDTAssignmentUnit::TSR(), WatcherStreamFileReader::WatcherStreamFileReader(), and CSCTriggerPrimitivesBuilder::~CSCTriggerPrimitivesBuilder().
tuple testRegression::stdout_value = pipe.communicate() |
Definition at line 772 of file testRegression.py.
tuple testRegression::timeStamp = GetDate() |
Definition at line 764 of file testRegression.py.
Referenced by MatacqTBDataFormatter::printData(), evf::FUShmBuffer::setEvtTimeStamp(), MatacqRawEvent::setRawData(), and SiPixelPerformanceSummary::setTimeStamp().
string testRegression::USERNAME = "CMS_COND_REGRESSION" |
Definition at line 21 of file testRegression.py.