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/10/20 00:00:38 UTC

cvs commit: jakarta-gump/python/gump model.py logic.py document.py conf.py

ajack       2003/10/19 15:00:38

  Modified:    python/gump model.py logic.py document.py conf.py
  Log:
  Another Property fix
  Workaround to bogus parameter, to try to find cause.
  
  Revision  Changes    Path
  1.32      +23 -5     jakarta-gump/python/gump/model.py
  
  Index: model.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model.py,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- model.py	19 Oct 2003 17:46:36 -0000	1.31
  +++ model.py	19 Oct 2003 22:00:38 -0000	1.32
  @@ -449,13 +449,16 @@
         except:
           log.warn( "Cannot resolve srcdir of " + self.project + " for " + project.name)
   
  -    elif self.reference=='jarpath':
  +    elif self.reference=='jarpath' or self.reference=='jar':
         try:
           target=Project.list[self.project]
           if self.id:
             for jar in target.jar:
               if jar.id==self.id:
  -              self.value=jar.path
  +              if self.reference=='jarpath':
  +                  self.value=jar.path
  +              else:
  +                  self.value=jar.name
                 break
             else:
               self.value=("jar with id %s was not found in project %s " +
  @@ -476,6 +479,21 @@
         except Exception, details:
           log.warn( "Cannot resolve jarpath of " + self.project + \
             " for " + project.name + ". Details: " + str(details))
  +    elif self.path:
  +        #
  +        # Path relative to module's srcdir (or
  +        #
  +        module=Project.list[project.name].module
  +        srcdir=Module.list[module].srcdir
  +        
  +        # :TODO: ARBJ, this correct? I think it is close, but not...
  +        # Is module's srcdir same as project's ?
  +        self.value=os.path.abspath(os.path.join(srcdir,self.path))
  +    elif not hasattr(self,'value'):
  +        log.error('Unhandled Property: ' + self.name + ' on project: ' + \
  +                    project.name)
  +        
  +        
           
   # TODO: set up the below elements with defaults using complete()
   
  
  
  
  1.33      +4 -1      jakarta-gump/python/gump/logic.py
  
  Index: logic.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/logic.py,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- logic.py	19 Oct 2003 17:46:36 -0000	1.32
  +++ logic.py	19 Oct 2003 22:00:38 -0000	1.33
  @@ -577,7 +577,10 @@
     """Get JVM arguments for a project"""
     args=Parameters()
     for jvmarg in ant.jvmarg:
  -    args.addParameter(jvmarg.value)
  +    if jvmarg.value:
  +        args.addParameter(jvmarg.value)
  +    else:
  +        log.error('Bogus JVM Argument')
     return args
     
   def getAntProperties(workspace,ant):
  
  
  
  1.87      +25 -17    jakarta-gump/python/gump/document.py
  
  Index: document.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- document.py	18 Oct 2003 23:30:18 -0000	1.86
  +++ document.py	19 Oct 2003 22:00:38 -0000	1.87
  @@ -803,12 +803,7 @@
           
           startListXDoc(x) 
           addItemXDoc(x,"Status: ", stateName(work.status))
  -        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,"Command: ", work.command.name)
  +        # addItemXDoc(x,"Command: ", work.command.name)
           if work.command.cwd:
               addItemXDoc(x,"Working Directory: ", work.command.cwd)
           if work.result.output:
  @@ -817,6 +812,15 @@
               addItemXDoc(x,"Output: None")
               
           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,"Elapsed Time: ", secsToString(work.secs))
  +        
           endListXDoc(x)
           endSectionXDoc(x)
          
  @@ -830,18 +834,22 @@
               startSectionXDoc(x,title)    
               x.write('<table><tr><th>Prefix</th><th>Name</th><th>Value</th></tr>')
               for param in work.command.params.items():
  -                x.write('<tr><td>')
  -                if param.prefix: 
  -                  x.write(param.prefix)
  -                x.write('</td><td>')
  -                x.write(param.name)
  -                x.write('</td><td>')
  -                val = param.value
  -                if val:
  -                    x.write(val)
  +                if param.name:
  +                    x.write('<tr><td>')
  +                    if param.prefix: 
  +                      x.write(param.prefix)
  +                    x.write('</td><td>')
  +                    x.write(param.name)
  +                    x.write('</td><td>')
  +                    val = param.value
  +                    if val:
  +                        x.write(val)
  +                    else:
  +                        x.write('N/A')
  +                    x.write('</td></tr>\n')  
                   else:
  -                    x.write('N/A')
  -                x.write('</td></tr>\n')        
  +                    log.error('Bogus parameter on ' + str(param))
  +                    
               x.write('</table>\n')
               endSectionXDoc(x)
                   
  
  
  
  1.26      +4 -4      jakarta-gump/python/gump/conf.py
  
  Index: conf.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/conf.py,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- conf.py	19 Oct 2003 17:46:36 -0000	1.25
  +++ conf.py	19 Oct 2003 22:00:38 -0000	1.26
  @@ -120,7 +120,7 @@
       
   class switch:
       """Configuration of switches """   
  -    optimize=1 # Optimize (at risk to exact correctness) anywhere one can
  +    optimize=0 # Optimize (at risk to exact correctness) anywhere one can
       optimizenetwork=1 # Do least network traffic 
       failtesting=0 # Not testing.. 
       debugging=0 # Not debugging..