ajack       2004/03/02 16:49:52

  Modified:    python   .cvsignore
               python/gump/output nag.py
               python/gump gumprun.py engine.py
               python/gump/test nagging.py
  Log:
  Check check check
  
  Revision  Changes    Path
  1.7       +3 -1      gump/python/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/gump/python/.cvsignore,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- .cvsignore        15 Feb 2004 17:32:05 -0000      1.6
  +++ .cvsignore        3 Mar 2004 00:49:52 -0000       1.7
  @@ -9,4 +9,6 @@
   x.txt
   build
   *.log
  -bogus
  \ No newline at end of file
  +bogus
  +gumpy.log
  +gumpy.lock
  \ No newline at end of file
  
  
  
  1.20      +14 -8     gump/python/gump/output/nag.py
  
  Index: nag.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/output/nag.py,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- nag.py    2 Mar 2004 21:11:39 -0000       1.19
  +++ nag.py    3 Mar 2004 00:49:52 -0000       1.20
  @@ -210,28 +210,34 @@
           self.unsents += 1
           
       def getUnwantedContent(self):
  +        return 
self.getBatchContent(self.unwanteds,self.unwantedSubjects,self.unwanted)
  +             
  +    def getUnsentContent(self):
  +        return self.getBatchContent(self.unsents,self.unsentSubjects,self.unsent)
  +             
  +    def getBatchContent(self,count,subjects,batch):
           content = ''
           
  -        if self.unwanteds:
  +        if count:
               plural=''
  -            if self.unwanted > 0:
  +            if count > 0:
                   plural='s'
                   
               content = """Dear Gumpmeisters,
               
  -The following %s nag%s could have been sent (if requested)
  +The following %s nag%s should have been sent
   
   """ % (`self.unwanteds`, plural)
               
               content += SEPARATOR
               content += '\n'
               
  -            content += self.unwantedSubjects
  +            content += subjects
               
               content += SEPARATOR
               content += '\n'
               
  -            content += self.unwanted
  +            content += batch
               
           return content
               
  
  
  
  1.9       +2 -1      gump/python/gump/gumprun.py
  
  Index: gumprun.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/gumprun.py,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- gumprun.py        9 Jan 2004 19:57:19 -0000       1.8
  +++ gumprun.py        3 Mar 2004 00:49:52 -0000       1.9
  @@ -114,6 +114,7 @@
       def getWorkspace(self):
           return self.workspace
           
  +    # :TODO: Need ModuleSequence [tree] separate from ModuleList
       def getModules(self):
           return self.modules
               
  @@ -238,8 +239,8 @@
                   if self.isReady(todoProject,todo):
                       todo.remove(todoProject)
                       if not todoProject in result:
  -                        log.debug('New Result ['+todoProject.getName()+']')     
                           result.append(todoProject)
  +                        log.debug('Next Project ['+todoProject.getName()+'] is #' + 
str(len(result)))     
                       #else:
                       #    log.debug('Duplicate Result ['+todoProject.getName()+']')  
  
                       foundSome=1
  
  
  
  1.70      +46 -1     gump/python/gump/engine.py
  
  Index: engine.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/engine.py,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- engine.py 2 Mar 2004 21:11:39 -0000       1.69
  +++ engine.py 3 Mar 2004 00:49:52 -0000       1.70
  @@ -214,6 +214,11 @@
           logResourceUtilization('Before load statistics')
           self.loadStatistics(run)        
           
  +        #
  +        # Gather results.xml from other servers/workspaces
  +        #
  +        logResourceUtilization('Before generate results')
  +        gatherResults(run)
           
           #
           # Check the metadata
  @@ -743,6 +748,46 @@
       
       """
       
  -    def checkWorkspace(self,run): pass
  +    def checkWorkspace(self,run):
  +        """ Check a GumpRun's Projects """
  +        workspace=run.getWorkspace()
  +        
  +        log.debug('Total Project CheckList:');
  +        for p in list:
  +            log.debug('  To Check : ' + p.name)
  +
  +        log.debug('--- Building work directories with sources')
  +        
  +        
  +        # :TODO: Check the workspace?
  +        
  +        self.checkModules(run)
  +        self.checkProjects(run)
  +        
  +    def checkModules(self,run):
  +        # Check all the modules
  +        for module in run.getGumpSet().getModules():                  
  +            module.changeState(STATE_SUCCESS)        
  +
  +    def checkProjects(self,run):
  +        list=run.getGumpSet().getProjects()
  +        # Check all projects
  +        projectCount=len(list)
  +        projectNo=1
  +        for project in list:  
  +        
  +            log.info(' ------ 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())
  +
  +        
       
           
  
  
  
  1.6       +1 -1      gump/python/gump/test/nagging.py
  
  Index: nagging.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/test/nagging.py,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- nagging.py        2 Mar 2004 21:11:39 -0000       1.5
  +++ nagging.py        3 Mar 2004 00:49:52 -0000       1.6
  @@ -146,7 +146,7 @@
                       #print str(email)

                       

           nagger.getUnwantedContent()

  -        nagger.getSentContent()

  +        nagger.getUnsentContent()

                   

       def testNag(self):  

           nag(self.run)

  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to