gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump/document forrest.py
Date Thu, 20 Nov 2003 21:30:06 GMT
ajack       2003/11/20 13:30:06

  Modified:    python/gump/output statsdb.py
               python/gump/test pyunit.py model.py
               python/gump/model project.py
               python/gump/document forrest.py
  Log:
  1) Avoid dependency procesion on packages
  2) A stats DB location fix
  
  Revision  Changes    Path
  1.2       +1 -1      jakarta-gump/python/gump/output/statsdb.py
  
  Index: statsdb.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/output/statsdb.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- statsdb.py	20 Nov 2003 20:51:48 -0000	1.1
  +++ statsdb.py	20 Nov 2003 21:30:06 -0000	1.2
  @@ -81,7 +81,7 @@
       def __init__(self,dbdir=None,name=None):
           if not name: name='stats.db'
           if not dbdir: dbdir=dir.work
  -        self.dbpath    = os.path.normpath('%s/%s' % (dir,name))
  +        self.dbpath    = os.path.normpath('%s/%s' % (dbdir,name))
           log.debug('Open Statistic Database:' + self.dbpath)
           if not os.name == 'dos' and not os.name == 'nt':
               self.db		=	anydbm.open(self.dbpath,'c')
  
  
  
  1.5       +2 -3      jakarta-gump/python/gump/test/pyunit.py
  
  Index: pyunit.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/pyunit.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- pyunit.py	20 Nov 2003 20:51:49 -0000	1.4
  +++ pyunit.py	20 Nov 2003 21:30:06 -0000	1.5
  @@ -203,14 +203,13 @@
               
               # Call the test...
               try:
  -                log.debug('Perform [' + self.getName() + '::' + \
  +                log.info('Perform [' + self.getName() + '::' + \
                           name + ']')
                           
                   if hasattr(self,'setUp'):
                       self.setUp()
       
  -                test()
  -                
  +                test()                
                   
                   if hasattr(self,'tearDown'):
                       self.tearDown()
  
  
  
  1.2       +5 -0      jakarta-gump/python/gump/test/model.py
  
  Index: model.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/model.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- model.py	20 Nov 2003 20:51:49 -0000	1.1
  +++ model.py	20 Nov 2003 21:30:06 -0000	1.2
  @@ -87,6 +87,8 @@
           
           self.repo1=self.workspace.getRepository('repository1')  
                       
  +        self.package1=self.workspace.getProject('package1')
  +        
           self.project1=self.workspace.getProject('project1')
           self.project2=self.workspace.getProject('project2')             
           self.project3=self.workspace.getProject('project3')
  @@ -101,6 +103,9 @@
       def testWorkspace(self):
           self.assertNonZero('Has Log Directory',	\
                       self.workspace.getLogDirectory() )
  +                    
  +    def testPackages(self):
  +        self.assertTrue('Is a package', self.package1.isPackaged())
           
       def testRepository(self):
           repo1 = self.repo1
  
  
  
  1.11      +23 -18    jakarta-gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/project.py,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- project.py	20 Nov 2003 20:51:48 -0000	1.10
  +++ project.py	20 Nov 2003 21:30:06 -0000	1.11
  @@ -327,9 +327,13 @@
           if not self.inModule():
               self.addWarning("Not in a module")
               return
  +            
  +        # Packaged Projects don't need the full treatment..
  +        #
  +        packaged=self.isPackaged()
   
           # Import any <ant part
  -        if self.xml.ant:
  +        if self.xml.ant and not packaged:
               self.ant = Ant(self.xml.ant,self)
           
           # :TODO: Scripts
  @@ -377,27 +381,28 @@
           if self.ant: self.ant.expand(self,workspace)
   
           # Build Dependencies Map [including depends from <ant/<property/<depend
  -        (badDepends, badOptions) = self.buildDependenciesMap(workspace)
  +        if not packaged:
  +            (badDepends, badOptions) = self.buildDependenciesMap(workspace)
           
  -        # Complete dependencies so properties can reference the,
  -        for dependency in self.getDependencies():
  -            dependency.getProject().complete(workspace)
  +            # Complete dependencies so properties can reference the,
  +            for dependency in self.getDependencies():
  +                dependency.getProject().complete(workspace)
           
  -        # complete properties
  -        if self.ant: self.ant.complete(self,workspace)
  +            # complete properties
  +            if self.ant: self.ant.complete(self,workspace)
       
  -        #
  -        # TODO -- move these back?
  -        #
  -        if badDepends or badOptions: 
  -            for xmldepend in badDepends:
  -                self.changeState(STATE_FAILED,REASON_CONFIG_FAILED)
  -                self.addError("Bad Dependency. Project: " + xmldepend.project + " unknown
to *this* workspace")
  -                #log.error("Unknown Dependency [" + xmldepend.project + "] on [" + self.getName()
 + "]")                    
  +            #
  +            # TODO -- move these back?
  +            #
  +            if badDepends or badOptions: 
  +                for xmldepend in badDepends:
  +                    self.changeState(STATE_FAILED,REASON_CONFIG_FAILED)
  +                    self.addError("Bad Dependency. Project: " + xmldepend.project + " unknown
to *this* workspace")
  +                    #log.error("Unknown Dependency [" + xmldepend.project + "] on [" +
self.getName()  + "]")                    
   
  -            for xmloption in badOptions:                
  -                self.addWarning("Bad *Optional* Dependency. Project: " + xmloption.project
+ " unknown to *this* workspace")
  -                #log.warn("Unknown *Optional* Dependency [" + xmloption.project + "] on
[" + self.getName() + "]")    
  +                for xmloption in badOptions:                
  +                    self.addWarning("Bad *Optional* Dependency. Project: " + xmloption.project
+ " unknown to *this* workspace")
  +                    #log.warn("Unknown *Optional* Dependency [" + xmloption.project + "]
on [" + self.getName() + "]")    
           
           self.setComplete(1)
   
  
  
  
  1.10      +10 -6     jakarta-gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document/forrest.py,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- forrest.py	20 Nov 2003 20:51:50 -0000	1.9
  +++ forrest.py	20 Nov 2003 21:30:06 -0000	1.10
  @@ -1194,15 +1194,15 @@
           return icons
           
       def insertStateIcon(self,toObject,fromObject,xdocNode):
  -        return self.insertStateLink(toObject,fromObject,xdocNode)
  +        return self.insertStateLink(toObject,fromObject,xdocNode,1)
       
       def insertTypedLink(self,toObject,fromObject,xdocNode,state=0):
  -        return self.insertLink(toObject,fromObject,xdocNode,1,state)
  +        return self.insertLink(toObject,fromObject,xdocNode,1,state,0)
           
       def insertStateLink(self,toObject,fromObject,xdocNode,typed=0):
  -        return self.insertLink(toObject,fromObject,xdocNode,typed,1)
  +        return self.insertLink(toObject,fromObject,xdocNode,typed,1,0)
           
  -    def insertLink(self,toObject,fromObject,xdocNode,typed=0,state=0):
  +    def insertLink(self,toObject,fromObject,xdocNode,typed=0,state=0,icon=0):
           description=''
           if typed:
              description=toObject.__class__.__name__
  @@ -1223,8 +1223,12 @@
               return xdocNode.createLink(link,description)
           else:                  
               # Install the <link with an <icon inside
  -            node=xdocNode.createLink(link)
  -            return self.insertStatePairIcon(node,toObject,fromObject)
  +            if icon:
  +                node=xdocNode.createLink(link)
  +                return self.insertStatePairIcon(node,toObject,fromObject)
  +            else:
  +                return xdocNode.createLink(link,description)
  +            
      
       def getLink(self,toObject,fromObject=None,state=0):
           url=''
  
  
  

Mime
View raw message