You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2003/11/03 20:42:45 UTC
cvs commit: jakarta-gump/python/gump integrate.py model.py launcher.py context.py build.py nag.py logic.py document.py conf.py
ajack 2003/11/03 11:42:45
Modified: template/forrest/src/documentation/content/xdocs site.xml
python/gump integrate.py model.py launcher.py context.py
build.py nag.py logic.py document.py conf.py
Log:
1) Start on <delete and <mkdir
2) Start on projects.html
3) Link work to 'owning context' (so can eventually jump to work & back)
4) Up'ed timeout to 60 minutes. Tried (again) to detect/document timout.
Revision Changes Path
1.5 +1 -0 jakarta-gump/template/forrest/src/documentation/content/xdocs/site.xml
Index: site.xml
===================================================================
RCS file: /home/cvs/jakarta-gump/template/forrest/src/documentation/content/xdocs/site.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- site.xml 1 Oct 2003 18:19:13 -0000 1.4
+++ site.xml 3 Nov 2003 19:42:44 -0000 1.5
@@ -10,6 +10,7 @@
<index label="Index" href="index.html"/>
<index label="TODOs" href="todos.html"/>
<index label="Modules" href="modules.html"/>
+ <index label="Projects" href="projects.html"/>
<index label="Packages" href="packages.html"/>
<index label="Context" href="context.html"/>
</work>
1.12 +1 -3 jakarta-gump/python/gump/integrate.py
Index: integrate.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/integrate.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- integrate.py 29 Oct 2003 18:36:31 -0000 1.11
+++ integrate.py 3 Nov 2003 19:42:44 -0000 1.12
@@ -82,9 +82,7 @@
# Build HTML Result (via Forrest)
if not context.noForrest:
- # Bugs, looses some (e.g. packages modules)
- #document(workspace,context,1,modules,sequence)
- document(workspace,context,1)
+ document(workspace,context,1,modules,sequence)
#
# Nag about failures -- only if we are allowed to
1.40 +7 -3 jakarta-gump/python/gump/model.py
Index: model.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/model.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- model.py 21 Oct 2003 16:15:52 -0000 1.39
+++ model.py 3 Nov 2003 19:42:44 -0000 1.40
@@ -251,6 +251,7 @@
self.junitreport=Single(JunitReport)
self.work=Multiple(Work)
self.mkdir=Multiple(Mkdir)
+ self.delete=Multiple(Delete)
self.redistributable=Single(GumpModelObject)
# provide default elements when not defined in xml
@@ -584,6 +585,9 @@
# represents a <mkdir/> element
class Mkdir(GumpModelObject): pass
+
+# represents a <delete/> element
+class Delete(GumpModelObject): pass
# represents a <work/> element
class Work(GumpModelObject): pass
1.33 +1 -1 jakarta-gump/python/gump/launcher.py
Index: launcher.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/launcher.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- launcher.py 29 Oct 2003 18:36:31 -0000 1.32
+++ launcher.py 3 Nov 2003 19:42:45 -0000 1.33
@@ -412,7 +412,7 @@
#
# Assume timed out if this is not running...
#
- if not timer.isAlive():
+ if result.signal > 0:
result.status=CMD_STATUS_TIMED_OUT
log.error('Command timed out. [' + execString + '] [' + str(timeout) + '] seconds.')
# Process Outputs (exit_code and stderr/stdout)
1.34 +10 -4 jakarta-gump/python/gump/context.py
Index: context.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/context.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- context.py 29 Oct 2003 18:36:31 -0000 1.33
+++ context.py 3 Nov 2003 19:42:45 -0000 1.34
@@ -144,13 +144,15 @@
WORK_TYPE_CONFIG=2
WORK_TYPE_UPDATE=3
WORK_TYPE_SYNC=4
-WORK_TYPE_BUILD=5
-WORK_TYPE_DOCUMENT=6
+WORK_TYPE_PREBUILD=5
+WORK_TYPE_BUILD=6
+WORK_TYPE_DOCUMENT=7
workTypeDescriptions = { WORK_TYPE_CHECK : "CheckEnvironment",
WORK_TYPE_CONFIG : "Config",
WORK_TYPE_UPDATE : "Update",
WORK_TYPE_SYNC : "Synchronize",
+ WORK_TYPE_PREBUILD : "PreBuild",
WORK_TYPE_BUILD : "Build",
WORK_TYPE_DOCUMENT : "Document" }
@@ -250,8 +252,10 @@
REASON_CONFIG_FAILED=4
REASON_UPDATE_FAILED=5
REASON_SYNC_FAILED=6
-REASON_BUILD_FAILED=7
-REASON_MISSING_OUTPUTS=8
+REASON_PREBUILD_FAILED=7
+REASON_BUILD_FAILED=8
+REASON_BUILD_TIMEDOUT=9
+REASON_MISSING_OUTPUTS=10
reasonCodeDescriptions = { REASON_UNSET : "Not Set",
REASON_PACKAGE : "Complete Package Install",
@@ -260,6 +264,8 @@
REASON_CONFIG_FAILED : "Configuration Failed",
REASON_UPDATE_FAILED : "Update Failed",
REASON_SYNC_FAILED : "Synchronize Failed",
+ REASON_BUILD_FAILED : "Pre-Build Failed",
+ REASON_BUILD_TIMEDOUT : "Build Timed Out",
REASON_BUILD_FAILED : "Build Failed",
REASON_MISSING_OUTPUTS : "Missing Build Outputs" }
1.29 +110 -58 jakarta-gump/python/gump/build.py
Index: build.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/build.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- build.py 29 Oct 2003 18:36:31 -0000 1.28
+++ build.py 3 Nov 2003 19:42:45 -0000 1.29
@@ -182,74 +182,126 @@
if pctxt.okToPerformWork():
- #:TODO:Consider looking for outputs and deleting if found
-
- # get the module object given the module name,
+ # Get the module object given the module name,
# which is gotten from the project
module=Module.list[project.module]
- log.debug(' ------ Building: '+ module.name + ':' + project.name)
+ log.debug(' ------ Performing pre-Build Actions (mkdir/delete) for : '+ module.name + ':' + project.name)
+
+ performPreBuild( workspace, context, mctxt, module, pctxt, project )
+
+ if pctxt.okToPerformWork():
+
+ log.debug(' ------ Building: '+ module.name + ':' + project.name)
- cmd=getBuildCommand(workspace,module,project,context)
+ cmd=getBuildCommand(workspace,module,project,context)
- if cmd:
- # Execute the command ....
- cmdResult=execute(cmd,workspace.tmpdir)
+ if cmd:
+ # Execute the command ....
+ cmdResult=execute(cmd,workspace.tmpdir)
- # Update Context
- work=CommandWorkItem(WORK_TYPE_BUILD,cmd,cmdResult)
- pctxt.performedWork(work)
+ # Update Context
+ work=CommandWorkItem(WORK_TYPE_BUILD,cmd,cmdResult)
+ pctxt.performedWork(work)
- # Update Context w/ Results
- if not cmdResult.status==CMD_STATUS_SUCCESS:
- pctxt.propagateErrorState(STATUS_FAILED,REASON_BUILD_FAILED)
- else:
- if hasOutputs(project,pctxt):
- outputsOk=1
- for i in range(0,len(project.jar)):
- jar=os.path.normpath(project.jar[i].path)
- if jar:
- if not os.path.exists(jar):
- pctxt.propagateErrorState(STATUS_FAILED,REASON_MISSING_OUTPUTS)
- outputsOk=0
- pctxt.addError("Missing Output: " + str(jar))
-
- if outputsOk:
+ # Update Context w/ Results
+ if not cmdResult.status==CMD_STATUS_SUCCESS:
+ reason=REASON_BUILD_FAILED
+ if cmdResult.status==CMD_STATUS_TIMED_OUT:
+ reason=REASON_BUILD_TIMEDOUT
+ pctxt.propagateErrorState(STATUS_FAILED,reason)
+ else:
+ if hasOutputs(project,pctxt):
+ outputsOk=1
for i in range(0,len(project.jar)):
jar=os.path.normpath(project.jar[i].path)
- # Copy to repository
- repository.publish( module.name, jar )
-
- pctxt.status=STATUS_SUCCESS
+ if jar:
+ if not os.path.exists(jar):
+ pctxt.propagateErrorState(STATUS_FAILED,REASON_MISSING_OUTPUTS)
+ outputsOk=0
+ pctxt.addError("Missing Output: " + str(jar))
+
+ if outputsOk:
+ for i in range(0,len(project.jar)):
+ jar=os.path.normpath(project.jar[i].path)
+ # Copy to repository
+ repository.publish( module.name, jar )
+
+ pctxt.status=STATUS_SUCCESS
- # For 'fun' list repository
- listDirectoryAsWork(pctxt,repository.getGroupDir(module.name), \
+ # For 'fun' list repository
+ listDirectoryAsWork(pctxt,repository.getGroupDir(module.name), \
'list_repo_'+project.name)
+ else:
+ #
+ # List all directories that should've contained
+ # outputs, to see what is there.
+ #
+ dirs=[]
+ dircnt=0
+ for i in range(0,len(project.jar)):
+ jar=os.path.normpath(project.jar[i].path)
+ if jar:
+ dir=os.path.dirname(jar)
+ if not dir in dirs and os.path.exists(dir):
+ dircnt += 1
+ listDirectoryAsWork(pctxt,dir,\
+ 'list_'+project.name+'_dir'+str(dircnt)+'_'+os.path.basename(dir))
+ dirs.append(dir)
+ else:
+ pctxt.addWarning("No such directory (where output is expect) : " + dir)
else:
- #
- # List all directories that should've contained
- # outputs, to see what is there.
- #
- dirs=[]
- dircnt=0
- for i in range(0,len(project.jar)):
- jar=os.path.normpath(project.jar[i].path)
- if jar:
- dir=os.path.dirname(jar)
- if not dir in dirs and os.path.exists(dir):
- dircnt += 1
- listDirectoryAsWork(pctxt,dir,\
- 'list_'+project.name+'_dir'+str(dircnt)+'_'+os.path.basename(dir))
- dirs.append(dir)
- else:
- pctxt.addWarning("No such directory (where output is expect) : " + dir)
- else:
- pctxt.status=STATUS_SUCCESS
+ pctxt.status=STATUS_SUCCESS
+
+ if not pctxt.status == STATUS_SUCCESS:
+ log.warn('Failed to build project [' + pctxt.name + ']')
+
+
+def performPreBuild( workspace, context, mctxt, module, pctxt, project ):
+ """ Perform pre-build Actions """
+
+ # Deletes...
+ dels=0
+ for delete in project.delete:
+ cmd=getDeleteCommand(workspace,context,module,project,delete,dels)
+
+ # Execute the command ....
+ cmdResult=execute(cmd,workspace.tmpdir)
- if not pctxt.status == STATUS_SUCCESS:
- log.warn('Failed to build project [' + pctxt.name + ']')
+ # Update Context
+ work=CommandWorkItem(WORK_TYPE_PREBUILD,cmd,cmdResult)
+ pctxt.performedWork(work)
+ # Update Context w/ Results
+ if not cmdResult.status==CMD_STATUS_SUCCESS:
+ pctxt.propagateErrorState(STATUS_FAILED,REASON_PREBUILD_FAILED)
+ else:
+ dels+=1
+ pctxt.status=STATUS_SUCCESS
+
+ # MkDirs...
+ mkdirs=0
+ for mkdir in project.mkdir:
+ cmd=getMkDirCommand(workspace,context,module,project,mkdir,mkdirs)
+
+ # Execute the command ....
+ cmdResult=execute(cmd,workspace.tmpdir)
+
+ # Update Context
+ work=CommandWorkItem(WORK_TYPE_PREBUILD,cmd,cmdResult)
+ pctxt.performedWork(work)
+
+ # Update Context w/ Results
+ if not cmdResult.status==CMD_STATUS_SUCCESS:
+ pctxt.propagateErrorState(STATUS_FAILED,REASON_PREBUILD_FAILED)
+ else:
+ mkdirs+=1
+ pctxt.status=STATUS_SUCCESS
+
+ if not pctxt.okToPerformWork():
+ log.warn('Failed to perform prebuild on project [' + pctxt.name + ']')
+
# static void main()
if __name__=='__main__':
1.22 +3 -4 jakarta-gump/python/gump/nag.py
Index: nag.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/nag.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- nag.py 30 Oct 2003 04:23:23 -0000 1.21
+++ nag.py 3 Nov 2003 19:42:45 -0000 1.22
@@ -108,9 +108,8 @@
def nagWorkspace(workspace,context):
""" Nag for the workspace """
content=getContent(workspace, context, "There is a workspace problem... \n")
- email=EmailMessage([workspace.mailinglist],workspace.email,workspace.prefix+': Gump Workspace Problem ',content)
- mail([ workspace.mailinglist ],workspace.email,email,workspace.mailserver)
-
+ sendEmail(workspace,workspace.mailinglist,workspace.email,workspace.prefix+': Gump Workspace Problem ',content)
+
def nagProject(workspace,context,module,mctxt,project,pctxt):
""" Nag to a specific project's <nag entry """
content=''
@@ -147,7 +146,7 @@
toaddr=getattr(nagEntry,'to',workspace.mailinglist)
fromaddr=getattr(nagEntry,'from',workspace.mailinglist)
- sendEmail(workspace,workspace.mailinglist,workspace.mailinglist,subject,content)
+ sendEmail(workspace,toaddr,fromaddr,subject,content)
nags+=1
except Exception, details:
1.43 +44 -3 jakarta-gump/python/gump/logic.py
Index: logic.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/logic.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- logic.py 24 Oct 2003 22:18:08 -0000 1.42
+++ logic.py 3 Nov 2003 19:42:45 -0000 1.43
@@ -201,9 +201,11 @@
for project in todo:
if project.isReady(todo):
todo.remove(project)
- if project.ant or project.script:
- if not project in result:
- result.append(project)
+ # :TODO: ARBJ -- add even if nothing to do, for completeness.
+ #
+ # if project.ant or project.script:
+ if not project in result:
+ result.append(project)
break
else:
# we have a circular dependency, remove all innocent victims
@@ -369,6 +371,45 @@
cmd.addParameter('-debug')
if context.verbose or verbose:
cmd.addParameter('-verbose')
+
+ return cmd
+
+def getDeleteCommand(workspace,context,module,project,delete,index=0):
+ basedir=os.path.abspath(os.path.join(module.srcdir or dir.base,script.basedir or ''))
+
+ cmd=Cmd('echo rm','delete_'+module.name+'_'+project.name+'_'+str(index+1),\
+ basedir)
+
+ #
+ # Delete a directory and/or a file
+ #
+ if delete.dir:
+ cmd.addParameter('-rf')
+ cmd.addParameter(os.path.abspath(os.path.join(basedir,delete.dir)))
+ elif delete.file:
+ cmd.addParameter('-f')
+ cmd.addParameter(os.path.abspath(os.path.join(basedir,delete.file)))
+ else:
+ log.info(' <delete without \'file\' or \'dir\' attributes.')
+ return None
+
+ return cmd
+
+def getMkDirCommand(workspace,context,module,project,mkdir,index=0):
+ basedir=os.path.abspath(os.path.join(module.srcdir or dir.base,script.basedir or ''))
+
+ cmd=Cmd('echo mkdir','mkdir_'+module.name+'_'+project.name+'_'+str(index+1),\
+ basedir)
+
+ #
+ # Make a directory
+ #
+ if mkdir.dir:
+ cmd.addParameter('-rf')
+ cmd.addParameter(os.path.abspath(os.path.join(basedir,mkdir.dir)))
+ else:
+ log.info(' <mkdir without \'dir\' attribute.')
+ return None
return cmd
1.101 +81 -49 jakarta-gump/python/gump/document.py
Index: document.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- document.py 2 Nov 2003 21:45:59 -0000 1.100
+++ document.py 3 Nov 2003 19:42:45 -0000 1.101
@@ -81,10 +81,10 @@
getProjectsForProjectExpression, getModuleNamesForProjectList, \
isFullGumpSet, getClasspathLists, AnnotatedPath, hasBuildCommand
-def documentText(workspace,context,moduleFilterList=None,projectFilterList=None):
- documentTextToFile(sys.stdout,workspace,context,moduleFilterList,projectFilterList)
+def documentText(workspace,context,moduleList=None,projectList=None):
+ documentTextToFile(sys.stdout,workspace,context,moduleList,projectList)
-def documentTextToFile(f,workspace,context,moduleFilterList=None,projectFilterList=None):
+def documentTextToFile(f,workspace,context,moduleList,projectList):
f.write("Workspace Status : " + stateName(context.status) + "\n")
f.write("Workspace Secs : " + str(context.elapsedSecs()) + "\n")
@@ -93,7 +93,7 @@
f.write(" - " + str(note) + "\n")
for mctxt in context:
mname=mctxt.name
- if moduleFilterList and not mctxt.module in moduleFilterList: continue
+ if moduleList and not mctxt.module in moduleList: continue
mname=mctxt.name
f.write(" Module [" + mname + "] Status: " + stateName(mctxt.status) + "\n")
f.write(" Projects: " + str(len(mctxt.subcontexts)) + "\n")
@@ -110,7 +110,7 @@
for pctxt in mctxt:
pname=pctxt.name
- if projectFilterList and not pctxt.project in projectFilterList: continue
+ if projectList and not pctxt.project in projectList: continue
f.write(" Project [" + pname + "] Status: " + stateName(pctxt.status) + "\n")
f.write(" Work [" + str(len(pctxt.worklist)) + "] [" + str(pctxt.elapsedSecs()) + "] secs." + "\n")
@@ -125,21 +125,21 @@
f.write(" Work Cwd : " + work.command.cwd + "\n")
f.write(" Work Exit : " + str(work.result.exit_code) + "\n")
-def document(workspace,context,full=None,moduleFilterList=None,projectFilterList=None):
+def document(workspace,context,full=None,moduleList=None,projectList=None):
log.debug('--- Documenting Results')
seedForrest(workspace,context)
# Testing...
- #documentText(workspace,context,moduleFilterList,projectFilterList)
+ #documentText(workspace,context,moduleList,projectList)
db=StatisticsDB()
- documentWorkspace(workspace,context,db,moduleFilterList,projectFilterList)
+ documentWorkspace(workspace,context,db,moduleList,projectList)
if full or 1: # Testing
- documentStatistics(workspace,context,db,moduleFilterList,projectFilterList)
+ documentStatistics(workspace,context,db,moduleList,projectList)
documentXRef(workspace,context)
executeForrest(workspace,context)
@@ -242,7 +242,7 @@
#
# Model Pieces
#
-def documentWorkspace(workspace,context,db,moduleFilterList=None,projectFilterList=None):
+def documentWorkspace(workspace,context,db,moduleList=None,projectList=None):
wdir=getWorkspaceDir(workspace)
@@ -323,7 +323,7 @@
# x.write('<p><strong>Workspace Config:</strong> <link href=\'xml.txt\'>XML</link></p>')
# x.write('<p><strong>RSS :</strong> <link href=\'index.rss\'>News Feed</link></p>')
- documentWorkList(x,workspace,context.worklist,'Workspace-level Work',wdir)
+ documentWorkList(x,workspace,context,context.worklist,'Workspace-level Work',wdir)
footerXDoc(x)
endXDoc(x)
@@ -347,7 +347,7 @@
for mctxt in context:
mname=mctxt.name
if not Module.list.has_key(mname): continue
- if moduleFilterList and not mctxt.module in moduleFilterList: continue
+ if moduleList and not mctxt.module in moduleList: continue
#
# Determine if there are todos, otherwise continue
@@ -420,7 +420,7 @@
if not Module.list.has_key(mname):
log.warn("Unknown module : " + mname)
continue
- if moduleFilterList and not mctxt.module in moduleFilterList:
+ if moduleList and not mctxt.module in moduleList:
log.info("Module filtered out: " + mname)
continue
mcount+=1
@@ -436,6 +436,40 @@
endTableXDoc(x)
endSectionXDoc(x)
+
+ #
+ # ----------------------------------------------------------------------
+ #
+ # Projects.xml
+ #
+ if projectList:
+ x=startXDoc(getWorkspaceDocument(workspace,wdir,'projects'))
+ headerXDoc(x,'All Projects')
+
+ documentSummary(x,context.getProjectSummary())
+
+ startSectionXDoc(x,'All Project')
+ startTableXDoc(x)
+ x.write(' <tr>')
+ x.write(' <th>Name</th><th>Project State</th><th>Elapsed Time</th>')
+ x.write(' </tr>')
+ pcount=0
+ for project in projectList:
+ pctxt=ontext.getProjectContextForProject(project)
+ pname=pctxt.name
+ pcount+=1
+
+ x.write(' <tr><!-- %s -->\n' % (pname))
+ x.write(' <td><link href=\'%s\'>%s</link></td><td>%s</td><td>%s</td>\n' % \
+ ( getProjectRelativeUrl(pname), \
+ pname, \
+ getStateIcon(pctxt)))
+ x.write(' <td>%s</td>\n' % elapsedTimeToString(pctxt.elapsedTime()))
+ x.write(' </tr>\n\n')
+
+ if not pcount: x.write(' <tr><td>None</td></tr>')
+ endTableXDoc(x)
+ endSectionXDoc(x)
footerXDoc(x)
endXDoc(x)
@@ -457,7 +491,7 @@
for mctxt in context:
mname=mctxt.name
if not Module.list.has_key(mname): continue
- if moduleFilterList and not mctxt.module in moduleFilterList: continue
+ if moduleList and not mctxt.module in moduleList: continue
packaged=0
#
@@ -505,8 +539,8 @@
for mctxt in context:
mname=mctxt.name
if not Module.list.has_key(mname): continue
- if moduleFilterList and not mctxt.module in moduleFilterList: continue
- documentModule(workspace,context,wdir,mctxt.name,mctxt,db,projectFilterList)
+ if moduleList and not mctxt.module in moduleList: continue
+ documentModule(workspace,context,wdir,mctxt.name,mctxt,db,projectList)
# Document context
@@ -514,7 +548,7 @@
x=startXDoc(getWorkspaceContextDocument(workspace,wdir))
headerXDoc(x,'Context')
x.write('<source>\n')
- documentTextToFile(x,workspace,context,moduleFilterList,projectFilterList)
+ documentTextToFile(x,workspace,context,moduleList,projectList)
x.write('</source>\n')
footerXDoc(x)
endXDoc(x)
@@ -538,7 +572,7 @@
href=getContextLink(context,0,icon)
return href
-def documentModule(workspace,context,wdir,modulename,modulecontext,db,projectFilterList=None):
+def documentModule(workspace,context,wdir,modulename,modulecontext,db,projectList=None):
mdir=getModuleDir(workspace,modulename,wdir)
if not Module.list.has_key(modulename): return
@@ -575,7 +609,7 @@
x.write(' </tr>')
pcount=0
for pctxt in modulecontext:
- if projectFilterList and not pctxt.project in projectFilterList: continue
+ if projectList and not pctxt.project in projectList: continue
pname=pctxt.name
#
@@ -607,7 +641,7 @@
x.write(' </tr>')
pcount=0
for pctxt in modulecontext:
- if projectFilterList and not pctxt.project in projectFilterList: continue
+ if projectList and not pctxt.project in projectList: continue
pname=pctxt.name
pcount+=1
@@ -637,14 +671,14 @@
# x.write('<p><strong>Module Config :</strong> <link href=\'xml.html\'>XML</link></p>')
- documentWorkList(x,workspace,modulecontext.worklist,'Module-level Work',mdir)
+ documentWorkList(x,workspace,modulecontext,modulecontext.worklist,'Module-level Work',mdir)
footerXDoc(x)
endXDoc(x)
# Document Projects
for pctxt in modulecontext:
- if projectFilterList and not pctxt.project in projectFilterList: continue
+ if projectList and not pctxt.project in projectList: continue
documentProject(workspace,context,modulename,mdir,pctxt.name,pctxt,db)
# Document the module XML
@@ -733,7 +767,7 @@
# x.write('<p><strong>Project Config :</strong> <link href=\'%s\'>XML</link></p>' \
# % (getModuleProjectRelativeUrl(modulename,projectcontext.name)) )
- documentWorkList(x,workspace,projectcontext.worklist,'Project-level Work',mdir)
+ documentWorkList(x,workspace,projectcontext,projectcontext.worklist,'Project-level Work',mdir)
footerXDoc(x)
endXDoc(x)
@@ -842,7 +876,7 @@
endTableXDoc(x)
endSectionXDoc(x)
-def documentWorkList(x,workspace,worklist,description='Work',dir='.'):
+def documentWorkList(x,workspace,workcontext,worklist,description='Work',dir='.'):
if not worklist: return
startSectionXDoc(x,description)
@@ -878,9 +912,9 @@
endSectionXDoc(x)
for work in worklist:
- documentWork(workspace,work,dir)
+ documentWork(workspace,workcontext,work,dir)
-def documentWork(workspace,work,dir):
+def documentWork(workspace,workcontext,work,dir):
if isinstance(work,CommandWorkItem):
x=startXDoc(getWorkDocument(dir,work.command.name,work.type))
headerXDoc(x, workTypeName(work.type) + ' : ' + work.command.name)
@@ -888,6 +922,7 @@
startListXDoc(x)
addItemXDoc(x,"Status: ", stateName(work.status))
+ addXItemXDoc(x,"For: ", getTypedContextLink(workcontext))
# addItemXDoc(x,"Command: ", work.command.name)
if work.command.cwd:
addItemXDoc(x,"Working Directory: ", work.command.cwd)
@@ -899,13 +934,10 @@
if work.result.signal:
addItemXDoc(x,"Termination Signal: ", str(work.result.signal))
addItemXDoc(x,"Exit Code: ", str(work.result.exit_code))
+
-
-
- addItemXDoc(x,"Start Time: ", time.strftime(setting.datetimeformat, \
- time.localtime(work.result.start_time)))
- addItemXDoc(x,"End Time: ", time.strftime(setting.datetimeformat, \
- time.localtime(work.result.end_time)))
+ addItemXDoc(x,"Start Time: ", secsToDate(work.result.start_time))
+ addItemXDoc(x,"End Time: ", secsToDate(work.result.end_time))
addItemXDoc(x,"Elapsed Time: ", secsToString(work.secs))
endListXDoc(x)
@@ -1027,7 +1059,7 @@
#
# Statistics Pages
#
-def documentStatistics(workspace,context,db,moduleFilterList=None,projectFilterList=None):
+def documentStatistics(workspace,context,db,moduleList=None,projectList=None):
stats=StatisticsGuru(workspace,context,db)
@@ -1046,20 +1078,20 @@
footerXDoc(x)
endXDoc(x)
- documentModulesByElapsed(stats, sdir, moduleFilterList)
- documentModulesByProjects(stats, sdir, moduleFilterList)
- documentModulesByDependencies(stats, sdir, moduleFilterList)
- documentModulesByDependees(stats, sdir, moduleFilterList)
- documentModulesByFOGFactor(stats, sdir, moduleFilterList)
+ documentModulesByElapsed(stats, sdir, moduleList)
+ documentModulesByProjects(stats, sdir, moduleList)
+ documentModulesByDependencies(stats, sdir, moduleList)
+ documentModulesByDependees(stats, sdir, moduleList)
+ documentModulesByFOGFactor(stats, sdir, moduleList)
-def documentModulesByElapsed(stats,sdir,moduleFilterList=None):
+def documentModulesByElapsed(stats,sdir,moduleList=None):
x=startXDoc(os.path.join(sdir,'elapsed.xml'))
headerXDoc(x, 'Modules By Elapsed Time')
startTableXDoc(x,'Modules By Elapsed')
for mctxt in stats.modulesByElapsed:
- if moduleFilterList and not mctxt.module in moduleFilterList: continue
+ if moduleList and not mctxt.module in moduleList: continue
titledXDataInTableXDoc(x,getContextLink(mctxt), elapsedTimeToString(mctxt.elapsedTime()))
endTableXDoc(x)
@@ -1067,13 +1099,13 @@
footerXDoc(x)
endXDoc(x)
-def documentModulesByProjects(stats,sdir,moduleFilterList=None):
+def documentModulesByProjects(stats,sdir,moduleList=None):
x=startXDoc(os.path.join(sdir,'projects.xml'))
headerXDoc(x, 'Modules By Project Count')
startTableXDoc(x,'Modules By Project Count')
for mctxt in stats.modulesByProjectCount:
- if moduleFilterList and not mctxt.module in moduleFilterList: continue
+ if moduleList and not mctxt.module in moduleList: continue
startTableRowXDoc(x)
insertTableDataXDoc(x, getContextLink(mctxt))
@@ -1091,13 +1123,13 @@
footerXDoc(x)
endXDoc(x)
-def documentModulesByDependencies(stats,sdir,moduleFilterList=None):
+def documentModulesByDependencies(stats,sdir,moduleList=None):
x=startXDoc(os.path.join(sdir,'dependencies.xml'))
headerXDoc(x, 'Modules By Dependency Count')
startTableXDoc(x,'Modules By Dependency Count')
for mctxt in stats.modulesByTotalDependencies:
- if moduleFilterList and not mctxt.module in moduleFilterList: continue
+ if moduleList and not mctxt.module in moduleList: continue
startTableRowXDoc(x)
insertTableDataXDoc(x, getContextLink(mctxt))
insertTableDataXDoc(x, mctxt.dependencyCount())
@@ -1116,13 +1148,13 @@
-def documentModulesByDependees(stats,sdir,moduleFilterList=None):
+def documentModulesByDependees(stats,sdir,moduleList=None):
x=startXDoc(os.path.join(sdir,'dependees.xml'))
headerXDoc(x, 'Modules By Dependee Count')
startTableXDoc(x,'Modules By Dependee Count')
for mctxt in stats.modulesByTotalDependees:
- if moduleFilterList and not mctxt.module in moduleFilterList: continue
+ if moduleList and not mctxt.module in moduleList: continue
startTableRowXDoc(x)
insertTableDataXDoc(x, getContextLink(mctxt))
insertTableDataXDoc(x, mctxt.dependeeCount())
@@ -1139,13 +1171,13 @@
footerXDoc(x)
endXDoc(x)
-def documentModulesByFOGFactor(stats,sdir,moduleFilterList=None):
+def documentModulesByFOGFactor(stats,sdir,moduleList=None):
x=startXDoc(os.path.join(sdir,'fogfactor.xml'))
headerXDoc(x, 'Modules By FOG Factor')
startTableXDoc(x,'Modules By FOG Factor')
for mctxt in stats.modulesByFOGFactor:
- if moduleFilterList and not mctxt.module in moduleFilterList: continue
+ if moduleList and not mctxt.module in moduleList: continue
startTableRowXDoc(x)
insertTableDataXDoc(x,getContextLink(mctxt))
insertTableDataXDoc(x, str(round(mctxt.getFOGFactor(),2)))
@@ -1168,7 +1200,7 @@
#
# XRef Pages
#
-def documentXRef(workspace,context,moduleFilterList=None,projectFilterList=None):
+def documentXRef(workspace,context,moduleList=None,projectList=None):
xdir=getXRefDir(workspace)
x=startXDoc(getXRefDocument(workspace,xdir))
1.35 +5 -5 jakarta-gump/python/gump/conf.py
Index: conf.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/conf.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- conf.py 23 Oct 2003 19:38:16 -0000 1.34
+++ conf.py 3 Nov 2003 19:42:45 -0000 1.35
@@ -94,7 +94,7 @@
globalws = os.path.normpath('%s/%s' % (dir.base, 'global-workspace.xml'))
merge = os.path.normpath('%s/%s' % (dir.work, 'merge.xml'))
date = time.strftime('%Y%m%d')
- logLevel = logging.INFO
+ logLevel = logging.INFO # logging.DEBUG
classpath = (os.getenv('CLASSPATH') or '').split(os.pathsep)
logurl = 'http://cvs.apache.org/builds/gump/nightly/'
@@ -118,7 +118,7 @@
datetimeformat="%a, %d %b %Y %H:%M:%S (%Z)"
- timeout=60*40 # 40 minutes (in seconds)
+ timeout=60*60 # 60 minutes (in seconds)
class switch:
"""Configuration of switches """