ATLAS Offline Software
Loading...
Searching...
No Matches
python.provideTwikiSummary Namespace Reference

Functions

 readReleaseList ()
 cleanDiffRoot (ref, val, q, ftype, path)
 cleanLog (ref, val, path, log)
 execDiffs (ref, val, path=None)
 readLogFile (path, log)
 PrintTwiki (ref, chk, q221, q431)
 execute_all_steps (ref, val, path, log)
 writeManyFiles (release_list)

Variables

 parser = OptionParser(usage="\n ./provideTwikiSummary.py -r 20.7.5.3 -v 20.7.5.4 -p <path with RunTier0Tests results> \n")
 type
 dest
 default
 None
 help
 options
 args
 release_list = readReleaseList()

Function Documentation

◆ cleanDiffRoot()

python.provideTwikiSummary.cleanDiffRoot ( ref,
val,
q,
ftype,
path )

Definition at line 19 of file provideTwikiSummary.py.

19def cleanDiffRoot(ref, val,q, ftype, path):
20 logfile = "%s/run_%s/diff-root-%s.%s.log" %(path,q,q,ftype)
21 outfile = "%s_vs_%s_diff-root-%s.%s.txt" %(ref,val,q,ftype)
22 if path:
23 outfile = "%s/%s_vs_%s/%s" %(path,ref,val,outfile)
24 command = 'cat %s | grep -v "diff= \\[" | grep -v "::sync-" > %s' %(logfile,outfile)
25 #print (command)
26 os.system(command)
27
28

◆ cleanLog()

python.provideTwikiSummary.cleanLog ( ref,
val,
path,
log )

Definition at line 29 of file provideTwikiSummary.py.

29def cleanLog(ref, val, path, log):
30#logfile = "/storage/users/mb1063/proc/checks_%s_vs_%s.log" %(ref,val)
31 logfile = "%s/%s" %(path,log)
32 outfile = "%s_vs_%s_RunTier0Test.txt" %(ref,val)
33 if path:
34 outfile = "%s/%s_vs_%s/%s" %(path,ref,val,outfile)
35 command = 'cat %s > %s' %(logfile,outfile)
36 #print (command)
37 os.system(command)
38
39

◆ execDiffs()

python.provideTwikiSummary.execDiffs ( ref,
val,
path = None )

Definition at line 40 of file provideTwikiSummary.py.

40def execDiffs(ref, val, path=None):
41 filename = "%s_vs_%s_tag-diff.txt" %(ref,val)
42 command1 = "get-tag-diff.py --ref=%s --chk=%s > %s/%s_vs_%s/%s" %(ref,val,path,ref,val,filename)
43 print (command1)
44 os.system(command1)
45
46
47"""
48 interprets log ATTENTION not all results with breaks T0 is really braking it, please double check
49"""

◆ execute_all_steps()

python.provideTwikiSummary.execute_all_steps ( ref,
val,
path,
log )

Definition at line 80 of file provideTwikiSummary.py.

80def execute_all_steps(ref,val,path,log):
81 #path = "%s_vs_%s" %(ref,val)
82
83 os.system("mkdir %s/%s_vs_%s" %(path,ref,val))
84 print ("INFO getting Tag diff of %s and %s" %(ref,val))
85 execDiffs(ref, val, path)
86 print ("INFO providing RunTier0Test log summary")
87 cleanLog(ref,val, path,log)
88 print ("INFO providing short q221 ESD diff-root summary")
89 cleanDiffRoot(ref,val,"q221","ESD", path)
90 print ("INFO providing short q221 AOD diff-root summary")
91 cleanDiffRoot(ref,val,"q221","AOD", path)
92 print ("INFO providing short q431 ESD diff-root summary")
93 cleanDiffRoot(ref,val,"q431","ESD", path)
94 print ("INFO providing short q431 AOD diff-root summary")
95 cleanDiffRoot(ref,val,"q431","AOD", path)
96
97 q221, q431 = readLogFile(path,log)
98 PrintTwiki(ref, val, q221, q431)
99
100
101"""
102 execute diff for a list of releases to be compared
103"""

◆ PrintTwiki()

python.provideTwikiSummary.PrintTwiki ( ref,
chk,
q221,
q431 )

Definition at line 64 of file provideTwikiSummary.py.

64def PrintTwiki(ref, chk, q221, q431):
65 status = "%Y%"
66 if "break" in q221 or "break" in q431:
67 status = "%X%"
68 path = "https://twiki.cern.ch/twiki/pub/Atlas/Tier0CacheReleases"
69
70 twiki = "| [[%s/%s_vs_%s_tag-diff.txt][%s vs %s]] | [[%s/%s_vs_%s_diff-root-q221.ESD.txt][ESD diff]] [[%s/%s_vs_%s_diff-root-q221.AOD.txt][AOD diff]] | [[%s/%s_vs_%s_diff-root-q431.ESD.txt][ESD diff]] [[%s/%s_vs_%s_diff-root-q431.AOD.txt][AOD diff]] | [[%s/%s_vs_%s_RunTier0Test.txt][%s/%s]] | %s | |" %(path,ref,chk,ref,chk,path,ref,chk,path,ref,chk,path,ref,chk,path,ref,chk,path,ref,chk,q221,q431,status)
71 print (twiki)
72 return 0
73
74
75
76
77"""
78
79"""

◆ readLogFile()

python.provideTwikiSummary.readLogFile ( path,
log )

Definition at line 50 of file provideTwikiSummary.py.

50def readLogFile(path,log):
51 q221 = "ok"
52 q431 = "ok"
53 f = open("%s/%s"%(path,log), 'r')
54 for line in f:
55 if "q221" in line and 'break' in line:
56 q221 = "breaks T0"
57 if "q431" in line and 'break' in line:
58 q431 = "breaks T0"
59 return q221, q431
60
61"""
62 prints line for twiki table
63"""

◆ readReleaseList()

python.provideTwikiSummary.readReleaseList ( )

Definition at line 7 of file provideTwikiSummary.py.

7def readReleaseList():
8 release_list = []
9 f = open('releaseList.txt', 'r')
10 for line in f:
11 try:
12 release_list.append(line.split()[0])
13 except Exception:
14 pass
15 return release_list
16
17
18

◆ writeManyFiles()

python.provideTwikiSummary.writeManyFiles ( release_list)

Definition at line 104 of file provideTwikiSummary.py.

104def writeManyFiles(release_list):
105 for idx,ref in enumerate(release_list):
106 try:
107 val = release_list[idx+1]
108 except Exception:
109 return 0
110 #print (rel, val)
111 execute_all_steps(ref,val)
112

Variable Documentation

◆ args

python.provideTwikiSummary.args

Definition at line 121 of file provideTwikiSummary.py.

◆ default

python.provideTwikiSummary.default

Definition at line 116 of file provideTwikiSummary.py.

◆ dest

python.provideTwikiSummary.dest

Definition at line 116 of file provideTwikiSummary.py.

◆ help

python.provideTwikiSummary.help

Definition at line 116 of file provideTwikiSummary.py.

◆ None

python.provideTwikiSummary.None

Definition at line 116 of file provideTwikiSummary.py.

◆ options

python.provideTwikiSummary.options

Definition at line 121 of file provideTwikiSummary.py.

◆ parser

python.provideTwikiSummary.parser = OptionParser(usage="\n ./provideTwikiSummary.py -r 20.7.5.3 -v 20.7.5.4 -p <path with RunTier0Tests results> \n")

Definition at line 115 of file provideTwikiSummary.py.

◆ release_list

python.provideTwikiSummary.release_list = readReleaseList()

Definition at line 125 of file provideTwikiSummary.py.

◆ type

python.provideTwikiSummary.type

Definition at line 116 of file provideTwikiSummary.py.