cvs commit: gump/python/gump/build builder.py
ajack 2004/07/28 08:50:30 Modified:python/gump preview.py python/gump/runner runner.py python/gump/notify notification.py notifier.py python/gump/document/xdocs documenter.py python/gump/document resolver.py python/gump/run gumprun.py python/gump/build builder.py Log: Restored 'preview' after JavaHelper refactor. Revision ChangesPath 1.9 +5 -2 gump/python/gump/preview.py Index: preview.py === RCS file: /home/cvs/gump/python/gump/preview.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- preview.py19 Jul 2004 16:07:53 - 1.8 +++ preview.py28 Jul 2004 15:50:29 - 1.9 @@ -77,8 +77,11 @@ if verbose: # Show the workings runner=getRunner(run) + +# updater=runner.getUpdater() builder=runner.getBuilder() +languageHelper=runner.getJavaHelper() for module in run.getGumpSet().getModules(): print SEPARATOR @@ -96,7 +99,7 @@ print project.getXml() project.dump() if project.hasBuilder(): -builder.preview(project) +builder.preview(project, languageHelper) # Show any nasties... if workspace.containsNasties(): 1.12 +16 -1 gump/python/gump/runner/runner.py Index: runner.py === RCS file: /home/cvs/gump/python/gump/runner/runner.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- runner.py 28 Jul 2004 01:26:08 - 1.11 +++ runner.py 28 Jul 2004 15:50:29 - 1.12 @@ -55,9 +55,15 @@ self.updater=GumpUpdater(run) self.builder=GumpBuilder(run) + +# A helper per language/type +# Note: All are Java right now... +self.java=gump.java.helper.JavaHelper(run) + # Stash them for reference... run.setUpdater(self.updater) -run.setBuilder(self.builder) +run.setBuilder(self.builder) +run.setJavaHelper(self.java) def initialize(self,exitOnError=True): @@ -157,6 +163,15 @@ def getBuilder(self): return self.builder + +def getJavaHelper(self): + + +Return the language specific helper + + +return self.java + # # Call a method called 'documentRun(run)' 1.7 +19 -5 gump/python/gump/notify/notification.py Index: notification.py === RCS file: /home/cvs/gump/python/gump/notify/notification.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- notification.py 21 Jul 2004 14:54:34 - 1.6 +++ notification.py 28 Jul 2004 15:50:29 - 1.7 @@ -199,6 +199,9 @@ def resolveAnnotations(self, resolver, stream): + +Resolve any annotations on the entity + # # Add an info/error/etc... @@ -211,7 +214,10 @@ stream.write(' -%s- %s\n' % (upper(levelName(note.level)), note.text)) def resolveWork(self, resolver, stream): - + +Resolve any work entries on the entity + + # # Work # @@ -227,11 +233,17 @@ def resolveStats(self, resolver, stream): + +Resolve any stats on the entity + + stats=self.entity.getStats() stream.write('\n\n') -def resolveSyndication(self, resolver, stream): - +def resolveSyndication(self, resolver, stream): + +Resolve syndication links on the entity + stream.write('\n') stream.write('To subscribe to this information via syndicated feeds:') stream.write('\n') @@ -243,8 +255,10 @@ stream.write(' RSS: ' + rssurl + '\n') stream.write(' Atom: ' + atomurl + '\n') -def resolveFooter(self, resolver, id, stream): - +def resolveFooter(self, resolver, id, stream): + +Resolve footer (Gump identification information) + stream.write('\n\n--\n') if id: stream.write('Gump E-mail Identifier (within run) #%s.\n' % id ) 1.13 +8 -2 gump/python/gump/notify/notifier.py Index: notifier.py
cvs commit: gump/python/gump/build builder.py
ajack 2004/07/28 09:16:02 Modified:python/gump/runner runner.py python/gump/build builder.py Log: There were a few final tweaks... Revision ChangesPath 1.13 +0 -1 gump/python/gump/runner/runner.py Index: runner.py === RCS file: /home/cvs/gump/python/gump/runner/runner.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- runner.py 28 Jul 2004 15:50:29 - 1.12 +++ runner.py 28 Jul 2004 16:16:01 - 1.13 @@ -172,7 +172,6 @@ return self.java - # # Call a method called 'documentRun(run)' # 1.12 +1 -1 gump/python/gump/build/builder.py Index: builder.py === RCS file: /home/cvs/gump/python/gump/build/builder.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- builder.py28 Jul 2004 15:50:30 - 1.11 +++ builder.py28 Jul 2004 16:16:02 - 1.12 @@ -90,7 +90,7 @@ # Right now everything is Java.. -languageHelper=self.java +languageHelper=self.run.getJavaHelper() # Extract stats (in case we want to do conditional processing) stats=None - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: gump/python/gump/build builder.py
ajack 2004/07/12 08:18:04 Modified:python/gump/model project.py python/gump/notify logic.py notifier.py python/gump/core commandLine.py gumprun.py python/gump/update updater.py python/gump/build builder.py Log: Halved the work done after a module update or project build (the events were being dispatched twice!) Worked on notification (the two e-mails were a tipoff to above). Revision ChangesPath 1.87 +1 -2 gump/python/gump/model/project.py Index: project.py === RCS file: /home/cvs/gump/python/gump/model/project.py,v retrieving revision 1.86 retrieving revision 1.87 diff -u -r1.86 -r1.87 --- project.py8 Jul 2004 20:33:07 - 1.86 +++ project.py12 Jul 2004 15:18:04 - 1.87 @@ -434,10 +434,9 @@ fromaddr=getDomAttributeValue(notifyEntry,'from',workspace.email) self.notifys.append( AddressPair( -getStringFromUnicode(toaddr),\ +getStringFromUnicode(toaddr), getStringFromUnicode(fromaddr))) - # Build Dependencies Map [including depends from ant|maven/property/depend if not packaged: (badDepends, badOptions) = self.importDependencies(workspace) 1.4 +7 -4 gump/python/gump/notify/logic.py Index: logic.py === RCS file: /home/cvs/gump/python/gump/notify/logic.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- logic.py 8 Jul 2004 20:33:06 - 1.3 +++ logic.py 12 Jul 2004 15:18:04 - 1.4 @@ -66,10 +66,13 @@ if not STATE_PREREQ_FAILED == stats.previousState: if stats.getTotalRuns() 1: notification=PositiveNotification(self.run,entity) -else: -if self.run.getOptions().isOfficial() \ -and entity.containsNasties(): -notification=NegativeNotification(self.run,entity,'Contains warning/error annotations.') +# :TODO: +# 1) Too verbose +# 2) Need a warning type w/o the 'outstanding ...' +# else: +#if self.run.getOptions().isOfficial() \ +#and entity.containsNasties(): +#notification=NegativeNotification(self.run,entity,' contains warning/error annotations') #elif entity.isPrereqFailed(): #if (stats.sequenceInState == 1): 1.7 +5 -5 gump/python/gump/notify/notifier.py Index: notifier.py === RCS file: /home/cvs/gump/python/gump/notify/notifier.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- notifier.py 8 Jul 2004 20:33:06 - 1.6 +++ notifier.py 12 Jul 2004 15:18:04 - 1.7 @@ -206,11 +206,11 @@ if self.unsent: return 1 return 0 - def notifyWorkspace(self,notification): Notify for the workspace content=notification.resolveContent(self.resolver, self.id) +self.id+=1 subject=self.workspace.prefix+': Gump Workspace ' + self.workspace.getName() @@ -223,6 +223,7 @@ # Form the content... content=notification.resolveContent(self.resolver, self.id) +self.id+=1 # Form the subject subject=self.workspace.prefix+ \ @@ -240,6 +241,7 @@ # Form the content... # content=notification.resolveContent(self.resolver, self.id) +self.id+=1 # Form the subject subject=self.workspace.prefix+': ' \ @@ -295,10 +297,8 @@ sent=False try: -log.info('Send Notify e-mail (#' + `self.id` + ') :\n To: ' + str(toaddr) + \ -'\n From: ' + str(fromaddr) + \ -'\n Subject: ' + str(subject)) -self.id+=1 +log.info('Send Notify To: ' + str(toaddr) + +' From: ' + str(fromaddr) + ' Subject: ' + str(subject)) # Form the user visable part ... email=EmailMessage( toaddrs, 1.11 +13 -14gump/python/gump/core/commandLine.py Index: commandLine.py === RCS file: /home/cvs/gump/python/gump/core/commandLine.py,v retrieving revision 1.10
cvs commit: gump/python/gump/build builder.py
ajack 2004/07/09 11:20:36 Modified:python/gump/document/xdocs xdoc.py python/gump/build builder.py Log: 1) Attempt to use rmtree (to remove a full dir) 2) PythonPowered Revision ChangesPath 1.4 +2 -2 gump/python/gump/document/xdocs/xdoc.py Index: xdoc.py === RCS file: /home/cvs/gump/python/gump/document/xdocs/xdoc.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- xdoc.py 8 Jul 2004 20:33:09 - 1.3 +++ xdoc.py 9 Jul 2004 18:20:36 - 1.4 @@ -756,7 +756,7 @@ self.context.writeLine(' tda href=%s/gump_stats/index.htmlStats/a/tdtd|/td' % self.rootpath) self.context.writeLine(' tda href=%s/gump_xref/index.htmlXRef/a/td' % self.rootpath) -self.context.writeLine(' td colspan=3img align=right src=%s/images/gump-logo.png alt=Logo//td' % self.rootpath) +self.context.writeLine(' td colspan=3img align=right src=%s/images/gump-logo.png alt=Gump Logo//td' % self.rootpath) self.context.writeLine(' /tr') self.context.writeLine('/table') else: @@ -779,7 +779,7 @@ self.context.writeLine('/document') else: from gump.core.config import default -self.context.writeLine('p align=rightLast Updated: %s/p' % default.datetime) +self.context.writeLine('p align=rightLast Updated: %s.img align=right src=%s/images/PythonPowered.gif alt=Python Logo//p' % default.datetime) self.context.writeLine('/html') self.close() 1.6 +21 -1 gump/python/gump/build/builder.py Index: builder.py === RCS file: /home/cvs/gump/python/gump/build/builder.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- builder.py8 Jul 2004 20:33:09 - 1.5 +++ builder.py9 Jul 2004 18:20:36 - 1.6 @@ -16,6 +16,18 @@ # limitations under the License. + + This is the main project builder for gump. + + 1) Pre build tasks (deleting directories/files, making directories) + are performed here. + + 2) Leveraging ant and/or maven and/or script 'assistants' the + project work is done (based of 'stat's, so --debug can be set in + a series of failures) + + 3) Post build tasks (verifying jars exist, publishing to repositories, + etc). @@ -183,6 +195,13 @@ def performDelete(self,project,delete,index=0): Return the delete command for a delete entry + +return + +# :TODO: Re-instate this some time, when can delete +# non-empty directories. + + basedir=os.path.abspath(project.getModule().getWorkingDirectory() or dir.base) # @@ -191,7 +210,8 @@ if delete.hasDirectory(): dir=delete.getDirectory() try: -os.rmdir(dir) +import shutil +shutil.rmtree(dir) project.addInfo('Deleted directory ['+dir+']') except: project.addError('Failed to delete directory ['+dir+']') - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: gump/python/gump/build builder.py
ajack 2004/06/29 13:06:41 Modified:python/gump/build Tag: CleanUp builder.py Log: Fixed a typo in MkDir. Revision ChangesPath No revision No revision 1.4.2.5 +10 -8 gump/python/gump/build/builder.py Index: builder.py === RCS file: /home/cvs/gump/python/gump/build/builder.py,v retrieving revision 1.4.2.4 retrieving revision 1.4.2.5 diff -u -r1.4.2.4 -r1.4.2.5 --- builder.py23 Jun 2004 21:38:43 - 1.4.2.4 +++ builder.py29 Jun 2004 20:06:41 - 1.4.2.5 @@ -216,7 +216,7 @@ # Make a directory # if mkdir.hasDirectory(): -dirToMake=delete.getDirectory() +dirToMake=mkdir.getDirectory() try: if not os.path.exists(dirToMake): os.makedirs(dirToMake) @@ -237,8 +237,7 @@ startedOk = project.okToPerformWork() -# -if 0 and project.okToPerformWork(): +if project.okToPerformWork(): # Deletes... dels=0 for delete in project.getDeletes(): @@ -246,8 +245,10 @@ self.performDelete(project,delete,dels) dels+=1 project.changeState(STATE_SUCCESS) -except: -log.error('PerformDelete Failed', exc_info=1) +except Exception, details: +message='Failed to perform delete ' + `delete` + ':' + str(details) +log.error(message, exc_info=1) +self.addError(message) project.changeState(STATE_FAILED,REASON_PREBUILD_FAILED) if project.okToPerformWork(): @@ -258,11 +259,12 @@ self.performMkDir(project,mkdir,mkdirs) mkdirs+=1 project.changeState(STATE_SUCCESS) -except: -log.error('PerformMkdir Failed', exc_info=1) +except Exception, details: +message='Failed to perform mkdir ' + `mkdir` + ':' + str(details) +log.error(message, exc_info=1) +self.addError(message) project.changeState(STATE_FAILED,REASON_PREBUILD_FAILED) - if startedOk and not project.okToPerformWork(): log.warn('Failed to perform pre-build on project [' + project.getName() + ']') - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: gump/python/gump/build builder.py
ajack 2004/06/29 15:04:22 Modified:python/gump/build Tag: CleanUp builder.py Log: Wrong object Revision ChangesPath No revision No revision 1.4.2.6 +2 -2 gump/python/gump/build/builder.py Index: builder.py === RCS file: /home/cvs/gump/python/gump/build/builder.py,v retrieving revision 1.4.2.5 retrieving revision 1.4.2.6 diff -u -r1.4.2.5 -r1.4.2.6 --- builder.py29 Jun 2004 20:06:41 - 1.4.2.5 +++ builder.py29 Jun 2004 22:04:22 - 1.4.2.6 @@ -248,7 +248,7 @@ except Exception, details: message='Failed to perform delete ' + `delete` + ':' + str(details) log.error(message, exc_info=1) -self.addError(message) +project.addError(message) project.changeState(STATE_FAILED,REASON_PREBUILD_FAILED) if project.okToPerformWork(): @@ -262,7 +262,7 @@ except Exception, details: message='Failed to perform mkdir ' + `mkdir` + ':' + str(details) log.error(message, exc_info=1) -self.addError(message) +project.addError(message) project.changeState(STATE_FAILED,REASON_PREBUILD_FAILED) if startedOk and not project.okToPerformWork(): - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: gump/python/gump/build builder.py
ajack 2004/06/23 14:38:43 Modified:python/gump/utils Tag: CleanUp work.py src/documentation/content/xdocs/metadata Tag: CleanUp maven.xml project.xml project Tag: CleanUp ant.xml jakarta-commons-sandbox.xml dom4j.xml python/gump/document/xdocs Tag: CleanUp xdoc.py documenter.py .Tag: CleanUp .cvsignore python/gump/update Tag: CleanUp cvs.py python/gump/build Tag: CleanUp builder.py Log: Cosmetic. Revision ChangesPath No revision No revision 1.15.4.5 +3 -0 gump/python/gump/utils/work.py Index: work.py === RCS file: /home/cvs/gump/python/gump/utils/work.py,v retrieving revision 1.15.4.4 retrieving revision 1.15.4.5 diff -u -r1.15.4.4 -r1.15.4.5 --- work.py 14 Jun 2004 21:31:45 - 1.15.4.4 +++ work.py 23 Jun 2004 21:38:42 - 1.15.4.5 @@ -146,6 +146,9 @@ overview += -\n return overview +def hasOutput(self): +return self.result.hasOutput() + def tail(self,lines=50,wrapLen=0,eol=None,marker=None): return self.result.tail(lines,wrapLen,eol,marker) No revision No revision 1.1.2.2 +6 -0 gump/src/documentation/content/xdocs/metadata/maven.xml Index: maven.xml === RCS file: /home/cvs/gump/src/documentation/content/xdocs/metadata/maven.xml,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- maven.xml 21 Jun 2004 04:06:10 - 1.1.2.1 +++ maven.xml 23 Jun 2004 21:38:42 - 1.1.2.2 @@ -45,6 +45,12 @@ /p p + Gump generates a strongbuild.properties/strong file for Maven, in which is specifies the jar + overrides, and also any link href=project.html#propertyproperties/link that are passes into + the lt;maven element. +/p + +p Currently Gump does strongnot/strong read the Maven project.xml (POM) to attempt to determine dependencies, the Gump descriptor needs to have them. The 'gump' goal in Maven ought generate such a file. 1.8.4.1 +7 -1 gump/src/documentation/content/xdocs/metadata/project.xml Index: project.xml === RCS file: /home/cvs/gump/src/documentation/content/xdocs/metadata/project.xml,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -u -r1.8 -r1.8.4.1 --- project.xml 16 Mar 2004 08:53:32 - 1.8 +++ project.xml 23 Jun 2004 21:38:42 - 1.8.4.1 @@ -713,7 +713,13 @@ tddir/td tdThe directory to create, relative to srcdir of the module containing this project./td - tdYes/td + tdYes, unless emfile/em is specified./td +/tr +tr + tdfile/td + tdThe file to delete, relative to srcdir of the + module containing this project./td + tdYes, unless emdir/em is specified/td /tr /table /section No revision No revision 1.19.2.1 +7 -7 gump/project/ant.xml Index: ant.xml === RCS file: /home/cvs/gump/project/ant.xml,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -u -r1.19 -r1.19.2.1 --- ant.xml 2 Jun 2004 12:21:49 - 1.19 +++ ant.xml 23 Jun 2004 21:38:42 - 1.19.2.1 @@ -55,7 +55,7 @@ license name=LICENSE/ -nag from=Gump Integration Build lt;[EMAIL PROTECTED]gt; +nag from=Gump Integration Build lt;[EMAIL PROTECTED]gt; to=[EMAIL PROTECTED]/ /project @@ -109,7 +109,7 @@ javadoc nested=build/javadocs project=ant/ -nag from=Gump Integration Build lt;[EMAIL PROTECTED]gt; +nag from=Gump Integration Build lt;[EMAIL PROTECTED]gt; to=[EMAIL PROTECTED]/ /project @@ -124,7 +124,7 @@ home nested=build/lib/ jar name=ant-testutil.jar id=ant-testutil/ -nag from=Gump Integration Build lt;[EMAIL PROTECTED]gt; +nag from=Gump Integration Build lt;[EMAIL PROTECTED]gt; to=[EMAIL PROTECTED]/ /project @@ -144,7 +144,7 @@ work nested=src/testcases/ work nested=src/etc/testcases/ -nag from=Gump Integration Build lt;[EMAIL PROTECTED]gt; +nag from=Gump Integration Build lt;[EMAIL PROTECTED]gt; to=[EMAIL PROTECTED] subject=Test
cvs commit: gump/python/gump/build builder.py
ajack 2004/06/21 08:53:31 Modified:template/xhtml/css Tag: CleanUp style.css python/gump/model Tag: CleanUp propagation.py misc.py python/gump/document/xdocs Tag: CleanUp xdoc.py python/gump/loader Tag: CleanUp loader.py python/gump/document Tag: CleanUp documenter.py .Tag: CleanUp gumpytest.sh python/gump/build Tag: CleanUp builder.py Added: template/xhtml Tag: CleanUp favicon.ico Removed: python/gump/model Tag: CleanUp rawmodel.py Log: Cosmetic tweaks (to XHTML/CSS). i.e the sort of distraction I wanted to avoid by using XDOCS only. ;-) Revision ChangesPath No revision No revision 1.1.2.4 +1 -1 gump/template/xhtml/css/Attic/style.css Index: style.css === RCS file: /home/cvs/gump/template/xhtml/css/Attic/style.css,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- style.css 18 Jun 2004 14:58:16 - 1.1.2.3 +++ style.css 21 Jun 2004 15:53:30 - 1.1.2.4 @@ -1 +1 @@ -img { border: 0 } HR { color: #8EB4D9; height: 1px; text-align: center; width: 90%; position: relative } # Annotations .DEBUG { background-color: #00 } .INFO { background-color: #00FF00 } .WARN { background-color: #00 } .ERROR { background-color: #FF } # State .SUCCESS{ background-color: #00FF00 } .FAILED { background-color: #FF } .PREREQFAILED { background-color: #00 } \ No newline at end of file +img { border: 0 } HR { color: #8EB4D9; height: 1px; text-align: center; width: 90%; position: relative } TABLE.TRANSPARENT { border: none; width: 100% } TABLE {border: thin solid #00; width: 100% } # Annotations .DEBUG { background-color: #00 } .INFO { background-color: #99CC66 } .WARN { background-color: #99 } .ERROR { background-color: #CC } # State .SUCCESS{ background-color: #99CC66 } .FAILED { background-color: #CC; foreground-color: #FF } .PREREQFAILED { background-color: #99 } .COMPLETE { background-color: #00CCFF } .UNSET { background-color: #CC } \ No newline at end of file No revision No revision 1.3.4.1 +1 -4 gump/python/gump/model/propagation.py Index: propagation.py === RCS file: /home/cvs/gump/python/gump/model/propagation.py,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -u -r1.3 -r1.3.4.1 --- propagation.py22 Apr 2004 22:58:16 - 1.3 +++ propagation.py21 Jun 2004 15:53:30 - 1.3.4.1 @@ -75,9 +75,6 @@ for object in self.getChildren(): object.changeState(state,reason,cause,message) -def setCause(self,cause): -if not self.cause: self.cause=cause - def hasCause(self): return self.cause @@ -85,7 +82,7 @@ return self.cause def addCause(self,cause): -if not self.cause: self.setCause(cause) +if not self.cause: self.cause=cause self.causes.append(cause) def getCauses(self): 1.1.2.4 +55 -11gump/python/gump/model/Attic/misc.py Index: misc.py === RCS file: /home/cvs/gump/python/gump/model/Attic/misc.py,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- misc.py 18 Jun 2004 14:58:17 - 1.1.2.3 +++ misc.py 21 Jun 2004 15:53:30 - 1.1.2.4 @@ -151,22 +151,66 @@ class JunitReport(Resolvable): def __init__(self,dom,owner): Resolvable.__init__(self,dom,owner) - -# represents a mkdir/ element -class Mkdir(Resolvable): -def __init__(self,dom,owner): -Resolvable.__init__(self,dom,owner) - -# represents a delete/ element -class Delete(Resolvable): -def __init__(self,dom,owner): -Resolvable.__init__(self,dom,owner) - + + # represents a work/ element class Work(Resolvable): def __init__(self,dom,owner): Resolvable.__init__(self,dom,owner) + + +class DirResolvable(ModelObject): + + Common code for getting a directory (attribute) and + returning that as a path relative to the + +def