gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r963050 - in /gump/live: ./ python/gump/core/language/ python/gump/core/model/ python/gump/core/update/ python/gump/test/ python/gump/test/resources/broken1/ python/gump/test/resources/full1/ python/gump/test/resources/simple1/ python/gump/...
Date Sun, 11 Jul 2010 11:16:37 GMT
Author: bodewig
Date: Sun Jul 11 11:16:37 2010
New Revision: 963050

URL: http://svn.apache.org/viewvc?rev=963050&view=rev
Log:
merge assorted unit test fixes

Modified:
    gump/live/   (props changed)
    gump/live/python/gump/core/language/java.py   (props changed)
    gump/live/python/gump/core/model/propagation.py
    gump/live/python/gump/core/update/bzr.py   (props changed)
    gump/live/python/gump/core/update/darcs.py   (props changed)
    gump/live/python/gump/core/update/hg.py   (props changed)
    gump/live/python/gump/test/loading.py
    gump/live/python/gump/test/model.py
    gump/live/python/gump/test/pyunit.py
    gump/live/python/gump/test/resources/broken1/broken_workspace.xml
    gump/live/python/gump/test/resources/full1/profile.xml
    gump/live/python/gump/test/resources/simple1/standalone_workspace.xml
    gump/live/python/gump/test/resources/simple2/workspace.xml
    gump/live/test/gumptest.sh

Propchange: gump/live/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jul 11 11:16:37 2010
@@ -1 +1 @@
-/gump/trunk:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962401
+/gump/trunk:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962401,963021-963048

Propchange: gump/live/python/gump/core/language/java.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jul 11 11:16:37 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/language/java.py:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,962395,962401
+/gump/trunk/python/gump/core/language/java.py:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,962395,962401,963021-963048

Modified: gump/live/python/gump/core/model/propagation.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/model/propagation.py?rev=963050&r1=963049&r2=963050&view=diff
==============================================================================
--- gump/live/python/gump/core/model/propagation.py (original)
+++ gump/live/python/gump/core/model/propagation.py Sun Jul 11 11:16:37 2010
@@ -33,6 +33,10 @@ class Propogatable(Stateful):
         self.cause=None	# Primary Cause
         self.causes=[]
             
+    def resetState(self):
+        """ Used by Unit Tests only """
+        Stateful.setStatePair(self, StatePair())        
+
     def changeState(self,state,reason=REASON_UNSET,cause=None,message=None):  
           
         #

Propchange: gump/live/python/gump/core/update/bzr.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jul 11 11:16:37 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/update/bzr.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962401
+/gump/trunk/python/gump/core/update/bzr.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962401,963021-963048

Propchange: gump/live/python/gump/core/update/darcs.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jul 11 11:16:37 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/update/darcs.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962401
+/gump/trunk/python/gump/core/update/darcs.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962401,963021-963048

Propchange: gump/live/python/gump/core/update/hg.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jul 11 11:16:37 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/update/hg.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962401
+/gump/trunk/python/gump/core/update/hg.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962401,963021-963048

Modified: gump/live/python/gump/test/loading.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/test/loading.py?rev=963050&r1=963049&r2=963050&view=diff
==============================================================================
--- gump/live/python/gump/test/loading.py (original)
+++ gump/live/python/gump/test/loading.py Sun Jul 11 11:16:37 2010
@@ -54,7 +54,7 @@ class LoadingTestSuite(UnitTestSuite):
         self.performLoad('gump/test/resources/full1/workspace.xml')
         
     def testBroken1(self):
-        self.performLoad('gump/test/resources/broken1/workspace.xml')
+        self.performLoad('gump/test/resources/broken1/broken_workspace.xml')
         
     # :TODO: Need to fix
     #def testCircular1(self):

Modified: gump/live/python/gump/test/model.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/test/model.py?rev=963050&r1=963049&r2=963050&view=diff
==============================================================================
--- gump/live/python/gump/test/model.py (original)
+++ gump/live/python/gump/test/model.py Sun Jul 11 11:16:37 2010
@@ -67,6 +67,10 @@ class ModelTestSuite(UnitTestSuite):
         self.module3=self.workspace.getModule('module3')
         self.module4=self.workspace.getModule('module4')
         self.module5=self.workspace.getModule('module5')
+
+        for p in [self.project1, self.project2, self.project3, self.project4,
+                  self.module1, self.module2, self.module3, self.module4]:
+            p.resetState()
         
     def suiteTearDown(self):
         self.workspace=None
@@ -169,17 +173,17 @@ class ModelTestSuite(UnitTestSuite):
         
         self.assertTrue('Module has CVS',
                         module1.getScm().getScmType() == SCM_TYPE_CVS)
-        self.assertNonZeroString('CVSROOT',module1.cvs.getCvsRoot())
-        self.assertNonZeroString('Has Tag',module1.cvs.getTag())
+        self.assertNonZeroString('CVSROOT',module1.getScm().getCvsRoot())
+        self.assertNonZeroString('Has Tag',module1.getScm().getTag())
         self.assertNonZeroString('Has Tag',module2.getTag())
     
     def testSvn(self):
         svnmodule1= self.workspace.getModule('svn_module1')
         
         self.assertTrue('Module has SVN',
-                        module1.getScm().getScmType() == SCM_TYPE_SVN)
-        self.assertNonZeroString('SVN URL',svnmodule1.svn.getRootUrl())
-        self.assertTrue('SVN Dir',svnmodule1.svn.hasDir())
+                        svnmodule1.getScm().getScmType() == SCM_TYPE_SVN)
+        self.assertNonZeroString('SVN URL',svnmodule1.getScm().getRootUrl())
+        self.assertTrue('SVN Dir',svnmodule1.getScm().hasDir())
     
     def testDependencyMapping(self):
         
@@ -201,16 +205,32 @@ class ModelTestSuite(UnitTestSuite):
         project3=self.project3
         project4=self.project4
         
+        self.assertEqual('Initial state should be UNSET',
+                         project1.getState(), STATE_UNSET)
+        self.assertEqual('Initial state should be UNSET',
+                         project2.getState(), STATE_UNSET)
+        self.assertEqual('Initial state should be UNSET',
+                         project3.getState(), STATE_UNSET)
+        self.assertEqual('Initial state should be UNSET',
+                         project4.getState(), STATE_UNSET)
+
         # Make one 'packaged'
-        module1.changeState(STATE_COMPLETE,REASON_PACKAGE)
+        module1.changeState(STATE_COMPLETE, REASON_PACKAGE)
         
         # Make one 'failed'
         module3.changeState(STATE_FAILED)
         
-        self.assertNotEqual('Complete State ought NOT propagate down', project1.getState(),
STATE_COMPLETE)
-        
-        self.assertEqual('State ought propagate to here', project4.getState(), STATE_PREREQ_FAILED)
-        self.assertNotEqual('State ought NOT propagate like this', project4.getState(), STATE_FAILED)
+        self.assertNotEqual('Complete State ought NOT propagate down',
+                            project1.getState(), STATE_COMPLETE)
+
+        self.assertEqual('State ought propagate to here',
+                         project3.getState(), STATE_FAILED)
+        self.assertEqual('project4 is a direct dependee of project3',
+                         project3.hasDirectDependee(project4), True)
+        self.assertNotEqual('State ought NOT propagate like this',
+                            project4.getState(), STATE_FAILED)
+        self.assertEqual('State ought propagate to here',
+                         project4.getState(), STATE_PREREQ_FAILED)
     
     def testMetadataLocations(self):
         module1=self.module1

Modified: gump/live/python/gump/test/pyunit.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/test/pyunit.py?rev=963050&r1=963049&r2=963050&view=diff
==============================================================================
--- gump/live/python/gump/test/pyunit.py (original)
+++ gump/live/python/gump/test/pyunit.py Sun Jul 11 11:16:37 2010
@@ -10,7 +10,7 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 # 
 # Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
+# distributed under the License is distributed on an "AS IS" BASIS, 
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
@@ -19,384 +19,403 @@
 """
 import os
 import sys
-from types import NoneType, StringTypes, TypeType, MethodType
+from types import NoneType
 import types
 import logging
 
 from gump import log
 from gump.core.gumpinit import gumpinit
-import gump.core.config
-from gump.util import *
+from gump.util import createOrderedList, formatException, \
+    invokeGarbageCollection, initializeGarbageCollection, printSeparator
 
-from fnmatch import fnmatch    
+from fnmatch import fnmatch
 
-class Testable:       
+class Testable:
     def __init__(self):
         pass
-        
+
     def raiseIssue(self, stuff):
         """
         Raise an issue (with a message and objects)
         :TODO: Look at Python varargs
         """
-        message=''
+        message = ''
         for s in stuff:
             message += '['
             message += str(s)
             message += '] '
-            
+
         raise RuntimeError, message
-        
-    def assertNotNone(self,message,object):        
-        if isinstance(object,NoneType):
-            self.raiseIssue(['Ought NOT be None', message, object])
-    
-    def assertNone(self,message,object):        
-        if not isinstance(object,NoneType):
-            self.raiseIssue(['Ought be None', message, object])
-            
-    def assertNonZero(self,message,object):
-        self.assertNotNone(message,object)
-        if not object:
-            self.raiseIssue(['Ought evaluate to non-zero', message, object])
-            
-    def assertEqual(self,message,object1,object2):
-        if not (object1 == object2):
-            self.raiseIssue(['Ought evaluate as equal', message, object1, object2])
-            
-    def assertGreater(self,message,object1,object2):
-        if not (object1 > object2):
-            self.raiseIssue(['Ought evaluate as greater', message, object1, object2])
-            
-    def assertNotEqual(self,message,object1,object2):
-        if object1 == object2:
-            self.raiseIssue(['Ought NOT evaluate as equal', message, object1, object2])
-            
-    def assertTrue(self,message,object):
-        if not object:
-            self.raiseIssue(['Ought evaluate as True', message, object])
-            
-    def assertFalse(self,message,object):
-        if object:
-            self.raiseIssue(['Ought evaluate as false', message, object])
-            
-    def assertInString(self,message,substr,str):
-        if -1 == str.find(substr):
-            self.raiseIssue(['Ought evaluate as in', message, substr, str])
-            
-    def assertIn(self,message,object,sequence):
-        if not object in sequence:
-            self.raiseIssue(['Ought evaluate as in', message, object, sequence])
-            
-    def assertSubstring(self,message,subString,mainString):
+
+    def assertNotNone(self, message, o):
+        if isinstance(o, NoneType):
+            self.raiseIssue(['Ought NOT be None', message, o])
+
+    def assertNone(self, message, o):
+        if not isinstance(o, NoneType):
+            self.raiseIssue(['Ought be None', message, o])
+
+    def assertNonZero(self, message, o):
+        self.assertNotNone(message, o)
+        if not o:
+            self.raiseIssue(['Ought evaluate to non-zero', message, o])
+
+    def assertEqual(self, message, o1, o2):
+        if not (o1 == o2):
+            self.raiseIssue(['Ought evaluate as equal', message, o1, o2])
+
+    def assertGreater(self, message, o1, o2):
+        if not (o1 > o2):
+            self.raiseIssue(['Ought evaluate as greater', message, o1, o2])
+
+    def assertNotEqual(self, message, o1, o2):
+        if o1 == o2:
+            self.raiseIssue(['Ought NOT evaluate as equal', message, o1, o2])
+
+    def assertTrue(self, message, o):
+        if not o:
+            self.raiseIssue(['Ought evaluate as True', message, o])
+
+    def assertFalse(self, message, o):
+        if o:
+            self.raiseIssue(['Ought evaluate as false', message, o])
+
+    def assertInString(self, message, substr, superstring):
+        if -1 == superstring.find(substr):
+            self.raiseIssue(['Ought evaluate as in', message, substr,
+                             superstring])
+
+    def assertIn(self, message, o, sequence):
+        if not o in sequence:
+            self.raiseIssue(['Ought evaluate as in', message, o, sequence])
+
+    def assertSubstring(self, message, subString, mainString):
         if -1 == mainString.find(subString):
-            self.raiseIssue(['Ought evaluate as a substring', \
-                message, subString, mainString, mainString.find(subString)])
-            
-    def assertNotEmpty(self,message,sequence):
+            self.raiseIssue(['Ought evaluate as a substring',
+                             message, subString, mainString,
+                             mainString.find(subString)])
+
+    def assertNotEmpty(self, message, sequence):
         if not sequence or not len(sequence) > 0:
             self.raiseIssue(['Ought NOT evaluate as empty', message, sequence])
-            
-    def assertNotIn(self,message,object,sequence):
-        if object in sequence:
-            self.raiseIssue(['Ought NOT evaluate as in', message, object, sequence])
 
-    def assertNotSubstring(self,message,subString,mainString):
+    def assertNotIn(self, message, o, sequence):
+        if o in sequence:
+            self.raiseIssue(['Ought NOT evaluate as in', message, o, sequence])
+
+    def assertNotSubstring(self, message, subString, mainString):
         if not -1 == mainString.find(subString):
-            self.raiseIssue(['Ought NOT evaluate as a substring', \
-                    message, subString, mainString, mainString.find(subString)])        
   
-    
-    def assertLengthAbove(self,message,object,length):
-        if not len(object) >= length:
-            self.raiseIssue(['Ought be longer than', message, object, length])
-    
-    def assertAt(self,message,object,sequence,posn):
-        self.assertLengthAbove(message,sequence,posn+1)        
-        self.assertEqual(message,object,sequence[posn] )
-            
-    def assertString(self,message,object):
-        if not isinstance(object,types.StringTypes):
-            self.raiseIssue(['Ought be a String type', message, object, type(object)])
-            
-    def assertNonZeroString(self,message,object):
-        self.assertNonZero(message,object)
-        self.assertString(message,object)
-        
-    def failed(self,message):
-        self.raiseIssue(['Failed', message])    
-        
+            self.raiseIssue(['Ought NOT evaluate as a substring',
+                             message, subString, mainString,
+                             mainString.find(subString)])
+
+    def assertLengthAbove(self, message, o, length):
+        if not len(o) >= length:
+            self.raiseIssue(['Ought be longer than', message, o, length])
+
+    def assertAt(self, message, o, sequence, posn):
+        self.assertLengthAbove(message, sequence, posn + 1)
+        self.assertEqual(message, o, sequence[posn])
+
+    def assertString(self, message, o):
+        if not isinstance(o, types.StringTypes):
+            self.raiseIssue(['Ought be a String type', message, o,
+                             type(o)])
+
+    def assertNonZeroString(self, message, o):
+        self.assertNonZero(message, o)
+        self.assertString(message, o)
+
+    def failed(self, message):
+        self.raiseIssue(['Failed', message])
+
 class Problem:
-    def __init__(self,suite,test,error=None):
-        self.suite=suite
-        self.test=test
-        self.error=error
-        
+    def __init__(self, suite, test, error = None):
+        self.suite = suite
+        self.test = test
+        self.error = error
+
     def __str__(self):
         return self.suite.getName() + ':' + self.test + ':' + self.error
-            
+
 class UnitTestSuite(Testable):
-    def __init__(self,name=None):
+    def __init__(self, name = None):
         Testable.__init__(self)
         if name:
-            self.name=name
+            self.name = name
         else:
-            self.name=self.__class__.__name__
-        self.depends=[]
-        self.fullDepends=[]
-            
-    def addDependency(self,suite):
+            self.name = self.__class__.__name__
+        self.depends = []
+        self.fullDepends = []
+
+    def addDependency(self, suite):
         self.depends.append(suite)
-    
-    def getFullDepends(self,visited=None):        
+
+    def getFullDepends(self, visited = None):
         # Cached already
         if self.fullDepends:
             return self.fullDepends
 
-        if not visited: visited=[]
-        if self in visited: return []
-        visited.append(self)        
-        
+        if not visited:
+            visited = []
+        if self in visited:
+            return []
+        visited.append(self)
+
         # Calculate
         for suite in self.depends:
-            for dependSuite in self.fullDepends(visited):
+            for dependSuite in suite.getFullDepends(visited):
                 if not dependSuite in self.fullDepends:
                     self.fullDepends.append(dependSuite)
-        
+
         # Return complete tree
         return self.fullDepends
-        
-    def isDependentUpon(self,suite):
+
+    def isDependentUpon(self, suite):
         return suite in self.getFullDepends()
-        
+
     def __cmp__(self, other):
-        if self.isDependentUpon(other): return 1
-        if other.isDependentUpon(self): return -1
+        if self.isDependentUpon(other):
+            return 1
+        if other.isDependentUpon(self):
+            return -1
         return 0
-        
+
     def getName(self):
         return self.name
-        
-    def performTests(self,patterns=None):
-    
-        tests=[]
-        results=[]
-                
+
+    def performTests(self, ptrns = None):
+
+        tests = []
+        results = []
+
         # Give a place to work in..
-        if not os.path.exists('./test'): os.mkdir('./test')
-        
+        if not os.path.exists('./test'):
+            os.mkdir('./test')
+
         # iterate over this suites properties
         for name in self.__class__.__dict__:
-            if name.startswith('__') and name.endswith('__'): continue
-            test=getattr(self,name)            
+            if name.startswith('__') and name.endswith('__'):
+                continue
+            test = getattr(self, name)
             # avoid nulls, metadata, and methods other than test*
-            if not test: continue
-            if isinstance(test,types.TypeType): continue
-            if not isinstance(test,types.MethodType): continue
-            if not callable(test): continue
-            if not name.startswith('test'): continue
-            
+            if not test:
+                continue
+            if isinstance(test, types.TypeType):
+                continue
+            if not isinstance(test, types.MethodType):
+                continue
+            if not callable(test):
+                continue
+            if not name.startswith('test'):
+                continue
+
             # If arguments, they are patterns to match
-            if patterns:
-                for pattern in patterns:    
+            if ptrns:
+                for pattern in ptrns:
                     try:
-                        if pattern=="all": pattern='*'
-                        if fnmatch(name,pattern): break         
+                        if pattern == "all":
+                            pattern = '*'
+                        if fnmatch(name, pattern):
+                            break
                     except Exception, detail:
-                        log.error('Failed to regexp: ' + pattern + '. Details: ' + str(detail))
+                        log.error('Failed to regexp: ' + pattern + \
+                                      '. Details: ' + str(detail))
                         continue
                 else:
                     # no match, advance to the next name
                     continue
-                
+
             # Store to perform
             tests.append(test)
-        
+
         if tests:
-            if hasattr(self,'suiteSetUp'):
+            if hasattr(self, 'suiteSetUp'):
                 self.suiteSetUp()
-    
+
             for test in tests:
                 # Call the test...
                 try:
-                    log.info('Perform [' + self.__class__.__name__+':'+test.__name__ + ']')
-                        
-                    if hasattr(self,'setUp'):
+                    log.info('Perform [' + self.__class__.__name__ + ':' \
+                                 + test.__name__ + ']')
+
+                    if hasattr(self, 'setUp'):
                         self.setUp()
-    
-                    test()                
-                
-                    if hasattr(self,'tearDown'):
+
+                    test()
+
+                    if hasattr(self, 'tearDown'):
                         self.tearDown()
-        
-                except Exception, details:
-                    log.error('Test [' + self.__class__.__name__+':'+test.__name__ + '] Failed',
exc_info=1)    
-                    
-                    # Log the traceback    
-                    import traceback
+
+                except Exception, _details:
+                    log.error('Test [' + self.__class__.__name__ \
+                                  + ':' + test.__name__ + '] Failed',
+                              exc_info = 1)
+
+                    # Log the traceback
                     ei = sys.exc_info()
-                    message=formatException(ei)
-                    del ei                
-                    
+                    message = formatException(ei)
+                    del ei
+
                     # Record the problem
-                    results.append(Problem(self,name,message))
-                
-                # Seems a nice place to peek/clean-up...    
-                invokeGarbageCollection(self.__class__.__name__+':'+test.__name__)
-        
-            if hasattr(self,'suiteTearDown'):
+                    results.append(Problem(self, name, message))
+
+                # Seems a nice place to peek/clean-up...
+                invokeGarbageCollection(self.__class__.__name__ + ':' \
+                                            + test.__name__)
+
+            if hasattr(self, 'suiteTearDown'):
                 self.suiteTearDown()
-                
+
         return (len(tests), results)
 
-      
+
 class TestRunner:
     def __init__(self):
-        self.suites=[]
-        
-    def addSuite(self,suite):
+        self.suites = []
+
+    def addSuite(self, suite):
         self.suites.append(suite)
-        
-    def run(self,args):
-        
-        #log.setLevel(logging.DEBUG ) 
-        log.setLevel(logging.INFO ) 
+
+    def run(self, args):
+
+        #log.setLevel(logging.DEBUG) 
+        log.setLevel(logging.INFO) 
         initializeGarbageCollection()
-        
+
         # Sort to resolve dependency order
-        runOrder=createOrderedList(self.suites)
-        
-        testsRun=0
-        problems=[]
-        
+        runOrder = createOrderedList(self.suites)
+
+        testsRun = 0
+        problems = []
+
         # Perform the tests
         for suite in runOrder:
             try:
                 (runs, results) = suite.performTests(args)
                 testsRun += runs
                 problems += results
-            except Exception, details:
+            except Exception, _details:
                 log.error('Failed')
-                import traceback
                 ei = sys.exc_info()
-                message=formatException(ei)
-                del ei    
-                problems.append(Problem(suite,'performTests',message)) 
-           
+                message = formatException(ei)
+                del ei
+                problems.append(Problem(suite, 'performTests', message)) 
+
         printSeparator()
-        
-        log.info('Performed [' + `testsRun` + '] tests with [' + `len(problems)` + '] issues.')
-        
+
+        log.info('Performed [' + `testsRun` + '] tests with [' + \
+                     `len(problems)` + '] issues.')
+
         for problem in problems:
             log.error('------------------------------------------------------------------------')
             log.error('PROBLEM: ' + str(problem))
-            
+
+        exit_code = 1
         if not problems:
             log.info('No Problems Detected')
-        
-        problems=None
-        self.suites=None
-        
-        # Seems a nice place to peek/clean-up...    
+            exit_code = 0
+
+        problems = None
+        self.suites = None
+
+        # Seems a nice place to peek/clean-up...
         invokeGarbageCollection('Done Testing')
-                
-        if problems:   sys.exit(1)
-        #sys.exit(0)
-                    
-def doRun(patterns):
+
+        sys.exit(exit_code)
+
+def doRun(ptrns):
     gumpinit()
-    
-    runner=TestRunner()
-    
+
+    runner = TestRunner()
+
     #:TODO: Figure out Python search/introspection to find these...
-    
+
     from gump.test.sync import SyncTestSuite
     runner.addSuite(SyncTestSuite())
 
-    from gump.test.utils import UtilsTestSuite  
+    from gump.test.utils import UtilsTestSuite
     runner.addSuite(UtilsTestSuite())
-    
-    from gump.test.model import ModelTestSuite  
+
+    from gump.test.model import ModelTestSuite
     runner.addSuite(ModelTestSuite())
-    
-    from gump.test.stats import StatsTestSuite  
+
+    from gump.test.stats import StatsTestSuite
     runner.addSuite(StatsTestSuite())
-    
-    from gump.test.documenter import DocumenterTestSuite  
+
+    from gump.test.documenter import DocumenterTestSuite
     runner.addSuite(DocumenterTestSuite())
-    
-    from gump.test.updater import UpdaterTestSuite  
+
+    from gump.test.updater import UpdaterTestSuite
     runner.addSuite(UpdaterTestSuite())
-    
-    from gump.test.syndicator import SyndicatorTestSuite  
+
+    from gump.test.syndicator import SyndicatorTestSuite
     runner.addSuite(SyndicatorTestSuite())
-    
-    from gump.test.maven import MavenTestSuite  
+
+    from gump.test.maven import MavenTestSuite
     runner.addSuite(MavenTestSuite())
-    
-    from gump.test.nant import NAntTestSuite  
+
+    from gump.test.nant import NAntTestSuite
     runner.addSuite(NAntTestSuite())
-    
-    from gump.test.xref import XRefTestSuite  
+
+    from gump.test.xref import XRefTestSuite
     runner.addSuite(XRefTestSuite())
-    
-    from gump.test.tools import ToolsTestSuite  
-    runner.addSuite(ToolsTestSuite())
-    
-    from gump.test.tools import ToolsTestSuite  
+
+    from gump.test.tools import ToolsTestSuite
     runner.addSuite(ToolsTestSuite())
-    
-    from gump.test.notifying import NotificationTestSuite  
+
+    from gump.test.notifying import NotificationTestSuite
     runner.addSuite(NotificationTestSuite())
-    
-    from gump.test.resulting import ResultingTestSuite  
+
+    from gump.test.resulting import ResultingTestSuite
     runner.addSuite(ResultingTestSuite())
-    
-    from gump.test.resolving import ResolvingTestSuite  
+
+    from gump.test.resolving import ResolvingTestSuite
     runner.addSuite(ResolvingTestSuite())
-    
-    from gump.test.unicode import UnicodeTestSuite  
+
+    from gump.test.unicode import UnicodeTestSuite
     runner.addSuite(UnicodeTestSuite())
-    
-    from gump.test.diagram import DiagramTestSuite  
+
+    from gump.test.diagram import DiagramTestSuite
     runner.addSuite(DiagramTestSuite())
-    
-    from gump.test.svg import SvgTestSuite  
+
+    from gump.test.svg import SvgTestSuite
     runner.addSuite(SvgTestSuite())
-    
-    from gump.test.timing import TimingTestSuite  
+
+    from gump.test.timing import TimingTestSuite
     runner.addSuite(TimingTestSuite())
-    
-    from gump.test.drawing import DrawingTestSuite  
+
+    from gump.test.drawing import DrawingTestSuite
     runner.addSuite(DrawingTestSuite())
-    
-    from gump.test.xdocs import XDocsTestSuite  
+
+    from gump.test.xdocs import XDocsTestSuite
     runner.addSuite(XDocsTestSuite())
-    
-    from gump.test.loading import LoadingTestSuite  
+
+    from gump.test.loading import LoadingTestSuite
     runner.addSuite(LoadingTestSuite())
-    
-    from gump.test.threads import ThreadingTestSuite  
+
+    from gump.test.threads import ThreadingTestSuite
     runner.addSuite(ThreadingTestSuite())
-    
-    from gump.test.artifacts import ArtifactsTestSuite  
+
+    from gump.test.artifacts import ArtifactsTestSuite
     runner.addSuite(ArtifactsTestSuite())
-    
-    from gump.test.launching import LaunchingTestSuite  
+
+    from gump.test.launching import LaunchingTestSuite
     runner.addSuite(LaunchingTestSuite())
  
-    from gump.test.language import LanguageTestSuite  
+    from gump.test.language import LanguageTestSuite
     runner.addSuite(LanguageTestSuite())
  
-    #from gump.test.describer import RDFDescriberTestSuite  
+    #from gump.test.describer import RDFDescriberTestSuite
     #runner.addSuite(RDFDescriberTestSuite())
  
-    
+
     # Perform the tests...
-    runner.run(patterns)
-    
-if __name__=='__main__':
+    runner.run(ptrns)
+
+if __name__ == '__main__':
     # Any args are pattern matches
-    patterns=list(sys.argv)
+    patterns = list(sys.argv)
     del patterns[0:1]
-    
+
     doRun(patterns)

Modified: gump/live/python/gump/test/resources/broken1/broken_workspace.xml
URL: http://svn.apache.org/viewvc/gump/live/python/gump/test/resources/broken1/broken_workspace.xml?rev=963050&r1=963049&r2=963050&view=diff
==============================================================================
--- gump/live/python/gump/test/resources/broken1/broken_workspace.xml (original)
+++ gump/live/python/gump/test/resources/broken1/broken_workspace.xml Sun Jul 11 11:16:37
2010
@@ -1,8 +1,8 @@
 <?xml version="1.0" ?>
 <workspace name="test"
-	       basedir="/data/gump" 
-           jardir="/data/gump/jars/latest"
-           pkgdir="/data/package"
+	   basedir="/tmp/gump" 
+           jardir="/tmp/gump/jars/latest"
+           pkgdir="/tmp/package"
            version="0.4">
   <property name="build.sysclasspath" value="only"/>
   <profile href="no_such_profile.xml"/>

Modified: gump/live/python/gump/test/resources/full1/profile.xml
URL: http://svn.apache.org/viewvc/gump/live/python/gump/test/resources/full1/profile.xml?rev=963050&r1=963049&r2=963050&view=diff
==============================================================================
--- gump/live/python/gump/test/resources/full1/profile.xml (original)
+++ gump/live/python/gump/test/resources/full1/profile.xml Sun Jul 11 11:16:37 2010
@@ -27,7 +27,7 @@
 
   <repository href="repository1.xml"/>
   <repository href="svn_repository1.xml"/>
-  <repository href="artifact_repository1.xml"/>
+  <!--repository href="artifact_repository1.xml"/-->
 
   <!-- Override package1 to be a package -->
   <project name='package1' package='package1' />

Modified: gump/live/python/gump/test/resources/simple1/standalone_workspace.xml
URL: http://svn.apache.org/viewvc/gump/live/python/gump/test/resources/simple1/standalone_workspace.xml?rev=963050&r1=963049&r2=963050&view=diff
==============================================================================
--- gump/live/python/gump/test/resources/simple1/standalone_workspace.xml (original)
+++ gump/live/python/gump/test/resources/simple1/standalone_workspace.xml Sun Jul 11 11:16:37
2010
@@ -1,9 +1,9 @@
 <?xml version="1.0" ?>
 <workspace name="test"
-	       basedir="/data/gump" 
-           jardir="/data/gump/jars/latest"
-           logdir="/data/gump/log"
-           pkgdir="/data/package"
+	   basedir="/tmp/gump" 
+           jardir="/tmp/gump/jars/latest"
+           logdir="/tmp/gump/log"
+           pkgdir="/tmp/package"
            version="0.4">
 
   <property name="build.sysclasspath" value="only"/>

Modified: gump/live/python/gump/test/resources/simple2/workspace.xml
URL: http://svn.apache.org/viewvc/gump/live/python/gump/test/resources/simple2/workspace.xml?rev=963050&r1=963049&r2=963050&view=diff
==============================================================================
--- gump/live/python/gump/test/resources/simple2/workspace.xml (original)
+++ gump/live/python/gump/test/resources/simple2/workspace.xml Sun Jul 11 11:16:37 2010
@@ -1,9 +1,9 @@
 <?xml version="1.0" ?>
 <workspace name="test"
-	       basedir="/data/gump" 
-           jardir="/data/gump/jars/latest"
-           logdir="/data/gump/log"
-           pkgdir="/data/package"
+	   basedir="/tmp/gump" 
+           jardir="/tmp/gump/jars/latest"
+           logdir="/tmp/gump/log"
+           pkgdir="/tmp/package"
            version="0.4">
 
   <property name="build.sysclasspath" value="only"/>

Modified: gump/live/test/gumptest.sh
URL: http://svn.apache.org/viewvc/gump/live/test/gumptest.sh?rev=963050&r1=963049&r2=963050&view=diff
==============================================================================
--- gump/live/test/gumptest.sh (original)
+++ gump/live/test/gumptest.sh Sun Jul 11 11:16:37 2010
@@ -45,16 +45,16 @@ echo "----------------------------------
 echo "Run ... $GUMP_PYTHON gump/test/pyunit.py"
 $GUMP_PYTHON gump/test/pyunit.py
 
-echo "--------------------------------------------------"
-echo "Run the environment check"
-$GUMP_PYTHON ../bin/env.py
+#echo "--------------------------------------------------"
+#echo "Run the environment check"
+#$GUMP_PYTHON ../bin/env.py
 
 
-echo "--------------------------------------------------"
+#echo "--------------------------------------------------"
 # echo "Run the Workspace check"
 # $GUMP_PYTHON ../bin/check.py -w ../metadata/test-workspace.xml all --debug
 
 
-echo "--------------------------------------------------"
+#echo "--------------------------------------------------"
 # echo "Run the Workspace preview"
 # $GUMP_PYTHON ../bin/preview.py -w ../metadata/test-workspace.xml all --debug



Mime
View raw message