ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/TWikiIB/makeQAPage.py
Revision: 1.1
Committed: Mon Sep 7 09:46:41 2009 UTC (15 years, 7 months ago) by geonmo
Content type: text/x-python
Branch: MAIN
Log Message:
New integration build page using TWiki

File Contents

# Content
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 import os, sys, time, re, urllib
4
5 class mkQAPage(object) :
6 def __init__(self, tday, arch, packagename) :
7 self.tday = tday
8 self.arch = arch
9 self.packagename = packagename
10 self.summarytype = self.packagename[6]+'.'+self.packagename[8]+'-'+self.tday+'-'+self.packagename[23:25]
11 print tday,arch,packagename
12
13 def makePage(self) :
14 import config
15 packagefile = open(config.siteInfo['IBPath']+self.packagename+'.txt','w')
16 packagefile.write('''%META:TOPICINFO{author="GunmoRyu" date="1248793608" format="1.1" version="1.1"}%\n%META:TOPICPARENT{name="IBQA"}%\n''')
17 packagefile.write('''---+CMSSW Integration Build QA Info
18 ---++Integration Build '''+self.packagename)
19 packagefile.write('\n---++ Ignominy information\n')
20 packagefile.write(' * [[https://macms01.cern.ch/ap/ignominy/'+self.arch+'/'+self.packagename+'/igRun/dependencies.txt][Dependency data]]\n')
21 packagefile.write(' * Dependency statistics\n')
22 packagefile.write(' * [['+self.packagename+'External][External tools versions]]\n')
23 packagefile.write(' * [[https://macms01.cern.ch/ap/ignominy/'+self.arch+'/'+self.packagename+'/igRun/index-subsystem.html][Individual Sub-Systems]]\n')
24
25 packagefile.write(' * Metrics\n')
26 packagefile.write(' * ALL _(Please, Mouse over)_ ')
27
28 from makeDepMetrics import mkDepMetrics
29 mkDM = mkDepMetrics(packagefile, self.tday,self.arch,self.packagename)
30 pkglist = mkDM.packlist()
31 outputlist = mkDM.repack(pkglist)
32 mkDM.dropdown(outputlist)
33
34 packagefile.write('---++Timing/Memory/FileSize information\n')
35 packagefile.write(' * _Using the timing/memory services on the Production !MinBias and !TTbar !RelVals (1 and 2 in cmsDriver_standard_hlt.txt). File size as reported by operating system._\n')
36 packagefile.write(' * Timing/Memory result _( Click : Large, !DoubleClick : Small)_\n')
37 if self.packagename[8]=='1' or self.packagename[8]=='3':
38 packagefile.write('''
39
40 %TABLE{ sort="off" tableborder="0" cellborder="0" valign="top" tablewidth="100%" columnwidths="100%,0%" }%
41 | *VMEM* |<img src="%ATTACHURLPATH%/1_thum.png" onclick="this.src='%ATTACHURL%/1.png'" ondblclick="this.src='%ATTACHURL%/1_thum.png'">|
42 |*Description* : This histogram is the total amount of virtual memory used by the task. |^|
43 |^|^|
44 | *RSS* |<img src="%ATTACHURLPATH%/2_thum.png" onclick="this.src='%ATTACHURL%/2.png'" ondblclick="this.src='%ATTACHURL%/2_thum.png'">|
45 |*Description* : This histogram is a task’s currently used share of available physical memory. |^|
46 |^|^|
47 | *CPU Time* |<img src="%ATTACHURLPATH%/3_thum.png" onclick="this.src='%ATTACHURL%/3.png'" ondblclick="this.src='%ATTACHURL%/3_thum.png'">|
48 |*Description* : This histogram is total CPU time the task has used since it started. |^|
49 |^|^|
50 | *RAW Size* |<img src="%ATTACHURLPATH%/4_thum.png" onclick="this.src='%ATTACHURL%/4.png'" ondblclick="this.src='%ATTACHURL%/4_thum.png'">|
51 |*Description* : This histogram is the size of RAW output data. |^|
52 |^|^|
53 | *Reco Size* |<img src="%ATTACHURLPATH%/5_thum.png" onclick="this.src='%ATTACHURL%/5.png'" ondblclick="this.src='%ATTACHURL%/5_thum.png'">|
54 |*Description* : This histogram is the size of RECO output data. |^|
55 |^|^|
56
57 ''')
58 packagefile.write('---++ Results from (limited) performance suite\n')
59 packagefile.write(' * _Limited (for IB) performance suite results._\n')
60 packagefile.write(' * [[https://macms01.cern.ch/cgi-bin/ap/showNewPerf.py?ib='+self.packagename+'][Performance suite results]]\n')
61 packagefile.write('''
62 ---++ Info on scram warnings and errors
63 ''')
64 packagefile.write(' * [['+self.packagename+'ScramInfo][Info on scram warnings and errors]]\n')
65 packagefile.write('---++ Number of old-style configuration files\n')
66 packagefile.write(' * [['+self.packagename+'CfgInfo][Number of old-style configuration files (*.cff, *.cfi, *.cfg) in release cfgInfo]]\n')
67 packagefile.write('''
68 ---++ Log file for checking Python Configuration files
69 * Log file for checking Python Configuration files pyCfgCheck
70 | *Check of Python configuration* |<img src="%ATTACHURLPATH%/pie_thum.png" onclick="this.src='%ATTACHURL%/pie.png'" ondblclick="this.src='%ATTACHURL%/pie_thum.png'">|
71 |*Description* : This histogram is the number of python error configuration file. |^|
72 |^|^|
73
74 ---++ Duplicate definitions of dictionaries
75 ''')
76 packagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/showDupDict.py//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/dupDict-dup.log][Duplicate definitions of dictionaries as found in class_def.xml files up]]\n')
77 packagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/showDupDict.py//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/dupDict-lostDefs.log][Definition of dictionaries in the "wrong" library]]\n')
78 packagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/showDupDict.py//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/dupDict-edmPD.log][Duplicate definitions of dictionaries as found in edmPlugins dupDict-edmPD]]\n')
79 packagefile.write('---+ Log file from the !BuildManager\n')
80 packagefile.write(' * [[http://cern.ch/cms-sdt/rc/'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/fullLog][Log file from the !BuildManager (check here if something _completly_ fails).]]\n')
81 packagefile.write(' * [[http://cern.ch/cms-sdt/rc//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/prebuild.log][Log file from "scram p" and CVS checkout.]]\n')
82 packagefile.write('---+ Directory listing for the test logs\n')
83 packagefile.write(' * [[http://cern.ch/cms-sdt/rc//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/][Directory listing for the test logs (unit-tests, all raw test logs)]]\n')
84 packagefile.write('---+ Status of documentation\n')
85 packagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/checkDocProxy.py?inPath=/afs/cern.ch/cms/sw/ReleaseCandidates/'+self.arch+'/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/src][Status of documentation for each subsystem and package (takes a while)]]\n')
86
87 packagefile.write('''-- Main.GunmoRyu & Main.HyunYongKim - 28 Jul 2009\n''')
88 packagefile.close()
89 file_path = config.siteInfo['TWikiPubDir']+self.packagename
90 if not os.path.exists(file_path) :
91 os.system('mkdir '+file_path)
92 os.system('chown www-data.www-data '+file_path)
93 from makeScramInfo import makeScramInfo
94 SA = makeScramInfo(self.packagename+'ScramInfo.txt',self.packagename,self.tday,self.arch)
95 SA.makeLog()
96 from makeCfgInfo import makeCfgInfo
97 CA = makeCfgInfo(self.packagename+'CfgInfo.txt',self.packagename,self.tday,self.arch)
98 CA.makeLog()
99
100 from makeExternalInfo import makeExternalInfo
101 EA = makeExternalInfo(self.packagename+'External.txt',self.packagename,self.tday,self.arch)
102 EA.makeLog()
103
104 import datetime
105 today = datetime.date.today()
106 timestamp=today.timetuple()
107 if timestamp[0] == int(self.packagename[12:16]) and timestamp[1] == int(self.packagename[17:19]) and timestamp[2]==int (self.packagename[20:22]) :
108 os.system(config.siteInfo['IBPath']+'makeBenchmark.py')
109 from chkpy import makePyCheck
110 MPC = makePyCheck(self.tday, self.arch, self.packagename)
111 MPC.mkPyCheck()
112 os.system('chown www-data.www-data *.png;mv -f *.png '+file_path)
113
114
115 def usage() :
116 print 'usage',sys.argv[0],'[--dummy]'
117 print ""
118 return
119
120 if __name__ == "__main__" :
121 import getopt
122 options = sys.argv[1:]
123 try:
124 opts, args = getopt.getopt(options, 'h',['help','dummy'])
125 except getopt.GetoptError:
126 usage()
127 sys.exit(-2)
128
129 rel = None
130 dummy = False
131 for o,a in opts:
132 if o in ('-h','--help'):
133 usage()
134 sys.exit()
135 if o in('--dummy') :
136 dummy = True
137
138 if not rel:
139 usage()
140 sys.exit(-1)
141