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 2004/03/04 18:26:10 UTC
cvs commit: gump/python/gump/test model.py
ajack 2004/03/04 09:26:10
Modified: python/gump/model project.py module.py server.py
python/gump/document forrest.py
python/gump/results resulter.py
python/gump/utils launcher.py file.py
python/gump/output nag.py xref.py
src/documentation/content/xdocs index.xml
python/gump engine.py
. status.xml
python/gump/test model.py
Added: src/documentation/content favicon.ico
template/forrest/src/documentation/content favicon.ico
Log:
Various minor fixes.
Revision Changes Path
1.59 +10 -5 gump/python/gump/model/project.py
Index: project.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/project.py,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- project.py 1 Mar 2004 18:58:00 -0000 1.58
+++ project.py 4 Mar 2004 17:26:08 -0000 1.59
@@ -73,6 +73,7 @@
from gump.model.ant import Ant,Maven,Script
from gump.model.rawmodel import Single
from gump.utils import getIndent
+from gump.utils.file import *
from gump.model.depend import *
from gump.utils.note import transferAnnotations, Annotatable
@@ -261,7 +262,7 @@
def getURL(self):
if self.xml.url and self.xml.url.href: return str(self.xml.url.href)
- return self.getModule().getURL()
+ return self.getModule().getURL()
def hasDescription(self):
return str(self.xml.description) or self.getModule().hasDescription()
@@ -269,6 +270,10 @@
def getDescription(self):
return str(self.xml.description) or self.getModule().getDescription()
+ def getMetadataLocation(self):
+ if self.xml.href and str(self.xml.href): return self.xml.href
+ return self.getModule().getMetadataLocation()
+
def addJar(self,jar):
self.jars[jar.getName()]=jar
@@ -618,7 +623,7 @@
#
from gump.utils.tools import listDirectoryToFileHolder
listDirectoryToFileHolder(self,self.getHomeDirectory(), \
- 'list_package_'+self.getName())
+ FILE_TYPE_PACKAGE, 'list_package_'+self.getName())
def importDependencies(self,workspace):
badDepends=[]
1.35 +10 -4 gump/python/gump/model/module.py
Index: module.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/module.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- module.py 1 Mar 2004 18:58:00 -0000 1.34
+++ module.py 4 Mar 2004 17:26:08 -0000 1.35
@@ -257,7 +257,8 @@
#
self.addProject(project)
else:
- workspace.addError('Duplicate project [' + xmlproject.name + ']')
+ workspace.addError('Duplicate project [' + xmlproject.name + '] in [' \
+ + project.getModule().getName() + '] and now [' + self.getName() + ']')
#
# Check for packaged
@@ -530,6 +531,11 @@
def getWorkspace(self):
return self.workspace
+ def getMetadataLocation(self):
+ # I think the bogus 'anonymous' module, needs this safety check
+ if self.xml: return str(self.xml.href)
+
+
def hasCvs(self):
if hasattr(self,'cvs') and self.cvs: return 1
return 0
1.10 +3 -0 gump/python/gump/model/server.py
Index: server.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/server.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- server.py 15 Feb 2004 17:32:05 -0000 1.9
+++ server.py 4 Mar 2004 17:26:08 -0000 1.10
@@ -87,6 +87,9 @@
def check(self,workspace):
pass
+ def isPython(self):
+ return self.hasType() and 'python' == self.getType()
+
def hasType(self):
return hasattr(self.xml,'type') and self.xml.type
1.91 +5 -5 gump/python/gump/document/forrest.py
Index: forrest.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- forrest.py 3 Mar 2004 20:32:14 -0000 1.90
+++ forrest.py 4 Mar 2004 17:26:09 -0000 1.91
@@ -1140,7 +1140,7 @@
elif not project.isPackaged() and project.hasBuildCommand():
document.createWarning('This project does not utilize Gump nagging.')
- metadataLocation=str(project.xml.href) or str(module.xml.href)
+ metadataLocation=project.getMetadataLocation()
if metadataLocation:
detailsList.createEntry('Gump Metadata: ', metadataLocation)
@@ -1384,7 +1384,7 @@
if len(servers) == 1: return # Assume this one.
serversSection=xdocNode.createSection('Servers')
- serversSection.createParagraph('These links represent this location on other servers.')
+ serversSection.createParagraph('These links represent this location (and, when available, the status) on other servers.')
serversTable=serversSection.createTable()
serverRow=serversTable.createRow()
1.13 +2 -1 gump/python/gump/results/resulter.py
Index: resulter.py
===================================================================
RCS file: /home/cvs/gump/python/gump/results/resulter.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- resulter.py 3 Mar 2004 01:19:45 -0000 1.12
+++ resulter.py 4 Mar 2004 17:26:09 -0000 1.13
@@ -131,7 +131,8 @@
if not server in self.serverResults:
results=None
try:
- results=self.loadResultsForServer(server)
+ if server.isPython():
+ results=self.loadResultsForServer(server)
except Exception, details:
log.warn('Failed to load results for [' + str(server) + '] : ' \
+ str(details), exc_info=1)
1.13 +5 -5 gump/python/gump/utils/launcher.py
Index: launcher.py
===================================================================
RCS file: /home/cvs/gump/python/gump/utils/launcher.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- launcher.py 18 Feb 2004 00:04:52 -0000 1.12
+++ launcher.py 4 Mar 2004 17:26:09 -0000 1.13
@@ -472,11 +472,11 @@
#
if result.signal > 0:
result.state=CMD_STATE_TIMED_OUT
- log.error('Command timed out. [' + execString + '] [' + str(timeout) + '] seconds.')
+ log.warn('Command timed out. [' + execString + '] [' + str(timeout) + '] seconds.')
# Process Outputs (exit_code and stderr/stdout)
elif result.exit_code > 0:
result.state=CMD_STATE_FAILED
- log.error('Command failed. [' + execString + ']. ExitCode: ' + str(result.exit_code))
+ log.warn('Command failed. [' + execString + ']. ExitCode: ' + str(result.exit_code))
else:
result.state=CMD_STATE_SUCCESS
1.4 +8 -2 gump/python/gump/utils/file.py
Index: file.py
===================================================================
RCS file: /home/cvs/gump/python/gump/utils/file.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- file.py 24 Feb 2004 22:14:49 -0000 1.3
+++ file.py 4 Mar 2004 17:26:09 -0000 1.4
@@ -72,12 +72,18 @@
FILE_TYPE_MISC=1
FILE_TYPE_CONFIG=2
-FILE_TYPE_OUTPUT=3
-FILE_TYPE_LOG=4
+FILE_TYPE_PACKAGE=3
+FILE_TYPE_OUTPUT=4
+FILE_TYPE_REPORT=5
+FILE_TYPE_REPO=6
+FILE_TYPE_LOG=7
fileTypeDescriptions = { FILE_TYPE_MISC : "Miscellaneous",
FILE_TYPE_CONFIG : "Config",
+ FILE_TYPE_PACKAGE : "Package",
FILE_TYPE_OUTPUT : "Output",
+ FILE_TYPE_REPORT : "Report",
+ FILE_TYPE_REPO : "Repository",
FILE_TYPE_LOG : "Log" }
def fileTypeDescription(type):
1.23 +8 -8 gump/python/gump/output/nag.py
Index: nag.py
===================================================================
RCS file: /home/cvs/gump/python/gump/output/nag.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- nag.py 3 Mar 2004 20:32:14 -0000 1.22
+++ nag.py 4 Mar 2004 17:26:09 -0000 1.23
@@ -169,7 +169,7 @@
self.unwantedSubjects=''
self.unwanteds=0
else:
- log.info('No unwanted nags.')
+ log.debug('No unwanted nags.')
# Belt and braces (nag to us if not nag to them)
if self.hasUnsent():
@@ -184,7 +184,7 @@
self.unsentSubjects=''
self.unsents=0
else:
- log.info('No unsent nags.')
+ log.debug('No unsent nags.')
def addUnwanted(self,subject,content):
if self.unwanted:
@@ -337,7 +337,9 @@
try:
- log.info('Send Nag e-mail to: ' + str(toaddr) + ' from: ' + str(fromaddr))
+ log.info('Send Nag e-mail to: ' + str(toaddr) + \
+ ' from: ' + str(fromaddr) + \
+ 'Subject: ' + str(subject))
#
# Form the user visable part ...
@@ -346,8 +348,6 @@
fromaddr, \
subject, \
content)
-
- log.info('Subject: ' + str(subject))
#print '-------------------------------------------------------------------'
#print 'To:' + `toaddr`
1.10 +4 -4 gump/python/gump/output/xref.py
Index: xref.py
===================================================================
RCS file: /home/cvs/gump/python/gump/output/xref.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- xref.py 29 Jan 2004 03:49:58 -0000 1.9
+++ xref.py 4 Mar 2004 17:26:09 -0000 1.10
@@ -167,7 +167,7 @@
def mapDescriptorLocations(self):
for module in self.workspace.getModules():
for project in module.getProjects():
- metadataLocation=str(project.xml.href) or str(module.xml.href)
+ metadataLocation=project.getMetadataLocation()
# print project.getName() + ' : Metadata Location = ' + metadataLocation + "\n";
1.1 gump/src/documentation/content/favicon.ico
<<Binary file>>
1.1 gump/template/forrest/src/documentation/content/favicon.ico
<<Binary file>>
1.6 +5 -0 gump/src/documentation/content/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/gump/src/documentation/content/xdocs/index.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- index.xml 29 Feb 2004 19:03:39 -0000 1.5
+++ index.xml 4 Mar 2004 17:26:10 -0000 1.6
@@ -166,6 +166,11 @@
<td>1.4.1_02-b06</td>
<td>Python Gump</td>
</tr>
+ <tr>
+ <td><link href="http://gump.try.sybase.com/">TrySybase</link> </td>
+ <td>1.4.2_03</td>
+ <td>Python Gump</td>
+ </tr>
</table>
</section>
1.73 +21 -14 gump/python/gump/engine.py
Index: engine.py
===================================================================
RCS file: /home/cvs/gump/python/gump/engine.py,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- engine.py 3 Mar 2004 20:32:14 -0000 1.72
+++ engine.py 4 Mar 2004 17:26:10 -0000 1.73
@@ -278,14 +278,18 @@
#log.debug('Modules to update:')
+ list=run.getGumpSet().getModules()
+ moduleCount=len(list)
+ moduleNo=1
# Update all the modules that have CVS repositories
- for module in run.getGumpSet().getModules():
+ for module in list:
if not module.hasCvs() \
and not module.hasSvn() \
and not module.hasJars(): continue
- log.debug('Perform CVS/SVN/Jars Update on: ' + module.getName())
+ log.debug('Perform CVS/SVN/Jars Update on #[' + `moduleNo` + \
+ '] of [' + `moduleCount` + ']: ' + module.getName())
if module.okToPerformWork():
@@ -413,15 +417,14 @@
projectNo=1
for project in list:
- log.info(' ------ Project: #[' + `projectNo` + '] of [' + `projectCount` + '] : ' + project.getName())
-
+ log.debug(' ------ Project: #[' + `projectNo` + '] of [' + `projectCount` + '] : ' + project.getName())
if project.isPackaged(): continue
-
# Do this even if not ok
self.performPreBuild( run, project )
+ wasBuilt=0
if project.okToPerformWork():
log.debug(' ------ Building: [' + `projectNo` + '] ' + project.getName())
@@ -434,7 +437,8 @@
# Update Context
work=CommandWorkItem(WORK_TYPE_BUILD,cmd,cmdResult)
project.performedWork(work)
-
+ wasBuilt=1
+
# Update Context w/ Results
if not cmdResult.state==CMD_STATE_SUCCESS:
reason=REASON_BUILD_FAILED
@@ -446,11 +450,14 @@
project.changeState(STATE_SUCCESS)
# Do this even if not ok
- self.performPostBuild( run, project, repository )
+ self.performPostBuild( run, project, repository, wasBuilt )
- if not project.okToPerformWork():
+ if project.isFailed():
log.warn('Failed to build project #[' + `projectNo` + '] [' + project.getName() + '], state:' \
+ project.getStateDescription())
+
+
+ projectNo+=1
def performDelete(self,project,delete,index=0):
@@ -572,7 +579,7 @@
log.warn('Failed to perform prebuild on project [' + project.getName() + ']')
- def performPostBuild(self, run, project, repository):
+ def performPostBuild(self, run, project, repository, wasBuilt):
"""Perform Post-Build Actions"""
log.debug(' ------ Performing post-Build Actions (check jars) for : '+ project.getName())
@@ -640,7 +647,7 @@
# For 'fun' list repository
listDirectoryToFileHolder(project,repository.getGroupDir(project.getModule().getName()), \
- 'list_repo_'+project.getName())
+ FILE_TYPE_REPO, 'list_repo_'+project.getName())
if not outputsOk:
#
@@ -671,7 +678,7 @@
#
# Display report output, even if failed...
#
- if project.hasReports():
+ if project.hasReports() and wasBuilt:
project.addInfo('Project produces reports')
for report in project.getReports():
reportDir=report.getResolvedPath()
@@ -679,7 +686,7 @@
catDirectoryContentsToFileHolder(project,reportDir,FILE_TYPE_OUTPUT)
# Maven generates a maven.log...
- if project.hasMaven() and not project.isPackaged():
+ if project.hasMaven() and wasBuilt and not project.isPackaged():
try:
logFile=project.locateMavenLog()
project.addDebug('Maven Log in: ' + logFile)
@@ -767,7 +774,7 @@
moduleNo=1
for module in list:
- log.info(' ------ Module: #[' + `moduleNo` + '] of [' + `moduleCount` + '] : ' + module.getName())
+ log.info(' ------ Check Module: #[' + `moduleNo` + '] of [' + `moduleCount` + '] : ' + module.getName())
module.changeState(STATE_SUCCESS)
moduleNo+=1
@@ -780,7 +787,7 @@
projectNo=1
for project in list:
- log.info(' ------ Project: #[' + `projectNo` + '] of [' + `projectCount` + '] : ' + project.getName())
+ log.info(' ------ Check Project: #[' + `projectNo` + '] of [' + `projectCount` + '] : ' + project.getName())
# :TODO: Do some actualy checking...
1.7 +5 -4 gump/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/gump/status.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- status.xml 29 Feb 2004 19:16:20 -0000 1.6
+++ status.xml 4 Mar 2004 17:26:10 -0000 1.7
@@ -27,9 +27,6 @@
<todo>
<actions priority="High Priority">
- <action context="community" dev="community">
- Propose gump as an Apache top level project.
- </action>
<action context="community" dev="community">
Keep project metadata clean/healthy, keep re-use strong.
</action>
@@ -46,6 +43,10 @@
Make it easier for folks to install/get started with local/private Gumps.
</action>
+ <action context="port" dev="community">
+ Port Gumpy to pure Python for Windows implementations.
+ </action>
+
<action context="admin" dev="admins">
Make distributed management easier (e.g. manually, for legal reasons, rsynch packages from central repository.)
</action>
@@ -76,7 +77,7 @@
</action>
<action context="docs" dev="community">
- Document gumpy.[bat|sh] and gump.[bat|sh].
+ Document gumpy.py and the other gump/*.py scripts.
</action>
</actions>
1.15 +10 -3 gump/python/gump/test/model.py
Index: model.py
===================================================================
RCS file: /home/cvs/gump/python/gump/test/model.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- model.py 17 Feb 2004 21:54:21 -0000 1.14
+++ model.py 4 Mar 2004 17:26:10 -0000 1.15
@@ -194,6 +194,13 @@
self.assertEqual('State ought propagate to here', project4.getState(), STATE_PREREQ_FAILED)
self.assertNotEqual('State ought NOT propagate like this', project4.getState(), STATE_FAILED)
+
+ def testMetadataLocations(self):
+ module1=self.module1
+ project1=self.project1
+
+ self.assertNotEmpty('Ought have a location', module1.getMetadataLocation() )
+ self.assertNotEmpty('Ought have a location', project1.getMetadataLocation() )
def testClasspaths(self):
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org