Return-Path: Delivered-To: apmail-gump-general-archive@www.apache.org Received: (qmail 1949 invoked from network); 21 May 2004 00:09:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 May 2004 00:09:52 -0000 Received: (qmail 50290 invoked by uid 500); 21 May 2004 00:10:18 -0000 Delivered-To: apmail-gump-general-archive@gump.apache.org Received: (qmail 50212 invoked by uid 500); 21 May 2004 00:10:17 -0000 Mailing-List: contact general-help@gump.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Gump code and data" Reply-To: "Gump code and data" Delivered-To: mailing list general@gump.apache.org Received: (qmail 50196 invoked by uid 500); 21 May 2004 00:10:17 -0000 Received: (qmail 50190 invoked by uid 98); 21 May 2004 00:10:17 -0000 Received: from ajack@apache.org by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(209.237.227.194):. Processed in 0.291115 secs); 21 May 2004 00:10:17 -0000 X-Qmail-Scanner-Mail-From: ajack@apache.org via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(209.237.227.194):. Processed in 0.291115 secs) Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by hermes.apache.org with SMTP; 21 May 2004 00:10:17 -0000 Received: (qmail 1896 invoked by uid 1728); 21 May 2004 00:09:45 -0000 Date: 21 May 2004 00:09:45 -0000 Message-ID: <20040521000945.1895.qmail@minotaur.apache.org> From: ajack@apache.org To: gump-cvs@apache.org Subject: cvs commit: gump/python/gump/core config.py gumpinit.py misc.py X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ajack 2004/05/20 17:09:45 Modified: python/gump/runner Tag: MultiRunner tasks.py runner.py python/gump/build Tag: MultiRunner maven.py builder.py python/gump/core Tag: MultiRunner config.py gumpinit.py Removed: python/gump/core Tag: MultiRunner misc.py Log: Test/Fix... Revision Changes Path No revision No revision 1.1.2.4 +184 -9 gump/python/gump/runner/Attic/tasks.py Index: tasks.py =================================================================== RCS file: /home/cvs/gump/python/gump/runner/Attic/tasks.py,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- tasks.py 19 May 2004 16:02:01 -0000 1.1.2.3 +++ tasks.py 21 May 2004 00:09:44 -0000 1.1.2.4 @@ -39,6 +39,13 @@ from gump.model.state import * +from gump.document.text.documenter import TextDocumenter +from gump.document.xdocs.documenter import XDocDocumenter + +from gump.results.resulter import gatherResults,generateResults +from gump.syndication.syndicator import syndicate + + ############################################################################### # Classes ############################################################################### @@ -71,21 +78,189 @@ # A few proxies... - def loadStatistics(self): self.misc.loadStatistics() - def updateStatistics(self): self.misc.updateStatistics() - def build(self): self.builder.build() def update(self): self.updater.update() - def prepareDocumentation(self): self.misc.prepareDocumentation() - def document(self): self.misc.document() - def generateResults(self): self.misc.generateResults() - def gatherResults(self): self.misc.gatherResults() + + """ + + ****************************************************************** + + CHECK WORKSPACE + + ****************************************************************** + + """ + + def checkWorkspace(self): + """ Check a GumpRun's Projects """ + workspace=self.run.getWorkspace() + + log.debug('--- Building work directories with sources') + + # :TODO: Check the workspace? + + self.checkModules() + self.checkProjects() + + def checkModules(self): + # Check all the modules + list=self.run.getGumpSet().getModuleSequence() + moduleCount=len(list) + moduleNo=1 + for module in list: + + log.info(' ------ Check Module: #[' + `moduleNo` + '] of [' + `moduleCount` + '] : ' + module.getName()) + + module.changeState(STATE_SUCCESS) + moduleNo+=1 + + def checkProjects(self): + list=self.run.getGumpSet().getProjects() + # Check all projects + + projectCount=len(list) + projectNo=1 + for project in list: + + log.info(' ------ Check Project: #[' + `projectNo` + '] of [' + `projectCount` + '] : ' + project.getName()) + + # :TODO: Do some actualy checking... + + if project.okToPerformWork(): + # For now, things are going good... + project.changeState(STATE_SUCCESS) + + if not project.okToPerformWork(): + log.warn('Failed to check project #[' + `projectNo` + '] [' + project.getName() + '], state:' \ + + project.getStateDescription()) + + projectNo+=1 + + """ + + ****************************************************************** + + THE DOCUMENTATION INTERFACE + + ****************************************************************** + + """ + + def prepareDocumentation(self): + + logResourceUtilization('Before document preparation') + + # Prepare for documentation + #documenter=self.run.getOptions().getDocumenter() + #if documenter : + # documenter.prepare(self.run) + + def document(self): + + # + # Build HTML Result (via Forrest or ...) + # + logResourceUtilization('Before document') + + #documenter=self.run.getOptions().getDocumenter() + #if documenter : + # documenter.document(self.run) + + + """ + + ****************************************************************** + + MISC STUFF + + ****************************************************************** + + """ + + def notify(self): + + # + # Only an 'all' is an official build, for them: + # + # Send Naggin E-mails + # + if self.run.getOptions().isOfficial() \ + and self.run.getGumpSet().isFull() \ + and self.run.getWorkspace().isNotify(): + + log.info('Notify about failures... ') + + # + # Notify about failures + # + logResourceUtilization('Before notify') + notify(self.run) + + def gatherResults(self): + # + # Gather results.xml from other servers/workspaces + # + logResourceUtilization('Before gather results') + gatherResults(self.run) + + def generateResults(self): + + logResourceUtilization('Before generate results') + # Update Statistics/Results on full self.runs + if self.run.getGumpSet().isFull(): + + # + # Generate results.xml for this self.run, on this server/workspace + # + logResourceUtilization('Before generate results') + generateResults(self.run) + + + def syndicate(self): + logResourceUtilization('Before syndicate') + # + # Provide a news feed (or few) + # + if self.run.getOptions().isOfficial(): + syndicate(self.run) + + def loadStatistics(self): + """ Load Statistics into the self.run (to get current values) """ + logResourceUtilization('Before load statistics') + self.processStatistics(1) + + def updateStatistics(self): + """ Update Statistics into the self.run (to set current values) """ + logResourceUtilization('Before update statistics') + self.processStatistics(0) + + def processStatistics(self,load): + + if load: + log.debug('--- Loading Project Statistics') + else: + log.debug('--- Updating Project Statistics') - def notify(self): self.misc.notify() + from gump.stats.statsdb import StatisticsDB + db=StatisticsDB() + + workspace=self.run.getWorkspace() + + if not load: + # + # Update stats (and stash onto projects) + # + db.updateStatistics(workspace) + + db.sync() + else: + # + # Load stats (and stash onto projects) + # + db.loadStatistics(workspace) - def syndicate(self): self.misc.syndicate() ########################################### 1.1.2.3 +12 -7 gump/python/gump/runner/Attic/runner.py Index: runner.py =================================================================== RCS file: /home/cvs/gump/python/gump/runner/Attic/runner.py,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- runner.py 18 May 2004 22:37:24 -0000 1.1.2.2 +++ runner.py 21 May 2004 00:09:44 -0000 1.1.2.3 @@ -24,12 +24,17 @@ from gump import log -from gump.core.misc import * from gump.update.updater import * from gump.build.builder import * -from gump.syndication.syndicator import * -from gump.results.resulter import * +from gump.document.text.documenter import TextDocumenter +from gump.document.xdocs.documenter import XDocDocumenter + +from gump.stats.statistician import Statistician +from gump.repository.publisher import RepositoryPublisher +from gump.notify.notifier import Notifier +from gump.results.resulter import Resulter +from gump.syndication.syndicator import Syndicator ############################################################################### # Classes @@ -43,8 +48,8 @@ # RunSpecific.__init__(self, run) - # Main players - self.misc=GumpMiscellaneous(run) + # Main players (soon we ought make + # them into actors, like the others). self.updater=GumpUpdater(run) self.builder=GumpBuilder(run) @@ -113,9 +118,9 @@ documenter=XDocDocumenter( self.run, \ self.run.getWorkspace().getBaseDirectory(), \ self.run.getWorkspace().getLogUrl()) - self.run.getOptions().setResolver(documenter.getResolver()) - + self.run.getOptions().setResolver(documenter.getResolver()) self.run.registerActor(documenter) + self.run.registerActor(Syndicator(self.run)) def setEndTime(self): No revision No revision 1.1.2.10 +1 -1 gump/python/gump/build/Attic/maven.py Index: maven.py =================================================================== RCS file: /home/cvs/gump/python/gump/build/Attic/maven.py,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -r1.1.2.9 -r1.1.2.10 --- maven.py 20 May 2004 17:10:38 -0000 1.1.2.9 +++ maven.py 21 May 2004 00:09:45 -0000 1.1.2.10 @@ -66,7 +66,7 @@ # # Get the appropriate build command... # - cmd=project.getBuildCommand(self.run.getEnvironment().getJavaCommand()) + cmd=self.getMavenCommand(project) if cmd: # Execute the command .... 1.1.2.8 +7 -176 gump/python/gump/build/Attic/builder.py Index: builder.py =================================================================== RCS file: /home/cvs/gump/python/gump/build/Attic/builder.py,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- builder.py 19 May 2004 22:26:55 -0000 1.1.2.7 +++ builder.py 21 May 2004 00:09:45 -0000 1.1.2.8 @@ -33,6 +33,7 @@ from gump.utils import dump, display, getIndent, logResourceUtilization, \ invokeGarbageCollection + from gump.utils.note import Annotatable from gump.utils.work import * @@ -133,10 +134,11 @@ stats=None if project.hasStats(): stats=project.getStats() - - #if project.isPackaged(): - # self.performProjectPackageProcessing(project, stats) - # continue + + # Code this nicer, perhaps... + if project.isPackaged(): + self.performProjectPackageProcessing(project, stats) + return # Do this even if not ok self.performPreBuild(project, stats) @@ -401,10 +403,7 @@ if project.hasOutputs(): outputs = [] - # # Ensure the jar output were all generated correctly. - # - outputsOk=1 for jar in project.getJars(): jarPath=os.path.abspath(jar.getPath()) # Add to list of outputs, in case we @@ -441,7 +440,7 @@ def checkPackage(self,project): - if self.okToPerformWork(): + if project.okToPerformWork(): # # Check the package was installed correctly... # @@ -461,175 +460,7 @@ # jars to check project.changeState(STATE_FAILED,REASON_PACKAGE_BAD) - # # List them, why not... - # - from gump.utils.tools import listDirectoryToFileHolder listDirectoryToFileHolder(project,project.getHomeDirectory(), \ FILE_TYPE_PACKAGE, 'list_package_'+project.getName()) - - def getBuildCommand(self,javaCommand='java'): - - # get the ant element (if it exists) - ant=self.xml.ant - - # get the maven element (if it exists) - maven=self.xml.maven - - # get the script element (if it exists) - script=self.xml.script - - if not (script or ant or maven): - # log.debug('Not building ' + project.name + ' (no or or