You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Rall <dl...@collab.net> on 2006/04/13 23:14:05 UTC

Re: svn commit: r19246 - trunk/subversion/tests/cmdline/svntest

I think you meant "pred.cond", rather than "pred.conv" in the change
log message.  Mind updating it?

Thanks, Dan


On Fri, 07 Apr 2006, mhagger@tigris.org wrote:

> Author: mhagger
> Date: Fri Apr  7 16:56:47 2006
> New Revision: 19246
> 
> Modified:
>    trunk/subversion/tests/cmdline/svntest/main.py
> 
> Log:
> Handle Skip conditions by throwing exception.
> 
> * subversion/tests/cmdline/svntest/main.py (TestRunner.run): Check for
>   pred.conv within the try...except and if it is true, just raise a
>   Skip exception.  This is then handled the same way as a Skip thrown
>   by the test itself.
> 
> 
> Modified: trunk/subversion/tests/cmdline/svntest/main.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/svntest/main.py?pathrev=19246&r1=19245&r2=19246
> ==============================================================================
> --- trunk/subversion/tests/cmdline/svntest/main.py	(original)
> +++ trunk/subversion/tests/cmdline/svntest/main.py	Fri Apr  7 16:56:47 2006
> @@ -667,44 +667,43 @@
>        args = ()
>  
>      result = 0
> -    if self.pred.cond:
> -      print self.pred.skip_text(),
> -    else:
> -      try:
> -        rc = apply(self.pred.func, args)
> -        if rc is not None:
> -          print 'STYLE ERROR in',
> -          self._print_name()
> -          print 'Test driver returned a status code.'
> -          sys.exit(255)
> -      except Skip, ex:
> -        result = 2
> -      except Failure, ex:
> -        result = 1
> -        # We captured Failure and its subclasses. We don't want to print
> -        # anything for plain old Failure since that just indicates test
> -        # failure, rather than relevant information. However, if there
> -        # *is* information in the exception's arguments, then print it.
> -        if ex.__class__ != Failure or ex.args:
> -          ex_args = str(ex)
> -          if ex_args:
> -            print 'EXCEPTION: %s: %s' % (ex.__class__.__name__, ex_args)
> -          else:
> -            print 'EXCEPTION:', ex.__class__.__name__
> -      except KeyboardInterrupt:
> -        print 'Interrupted'
> -        sys.exit(0)
> -      except SystemExit, ex:
> -        print 'EXCEPTION: SystemExit(%d), skipping cleanup' % ex.code
> -        print ex.code and 'FAIL: ' or 'PASS: ',
> +    try:
> +      if self.pred.cond:
> +        raise Skip
> +      rc = apply(self.pred.func, args)
> +      if rc is not None:
> +        print 'STYLE ERROR in',
>          self._print_name()
> -        raise
> -      except:
> -        result = 1
> -        print 'UNEXPECTED EXCEPTION:'
> -        traceback.print_exc(file=sys.stdout)
> -      print self.pred.run_text(result),
> -      result = self.pred.convert_result(result)
> +        print 'Test driver returned a status code.'
> +        sys.exit(255)
> +    except Skip, ex:
> +      result = 2
> +    except Failure, ex:
> +      result = 1
> +      # We captured Failure and its subclasses. We don't want to print
> +      # anything for plain old Failure since that just indicates test
> +      # failure, rather than relevant information. However, if there
> +      # *is* information in the exception's arguments, then print it.
> +      if ex.__class__ != Failure or ex.args:
> +        ex_args = str(ex)
> +        if ex_args:
> +          print 'EXCEPTION: %s: %s' % (ex.__class__.__name__, ex_args)
> +        else:
> +          print 'EXCEPTION:', ex.__class__.__name__
> +    except KeyboardInterrupt:
> +      print 'Interrupted'
> +      sys.exit(0)
> +    except SystemExit, ex:
> +      print 'EXCEPTION: SystemExit(%d), skipping cleanup' % ex.code
> +      print ex.code and 'FAIL: ' or 'PASS: ',
> +      self._print_name()
> +      raise
> +    except:
> +      result = 1
> +      print 'UNEXPECTED EXCEPTION:'
> +      traceback.print_exc(file=sys.stdout)
> +    print self.pred.run_text(result),
> +    result = self.pred.convert_result(result)
>      self._print_name()
>      sys.stdout.flush()
>      if sandbox is not None and not result and cleanup_mode:
>

Re: svn commit: r19246 - trunk/subversion/tests/cmdline/svntest

Posted by Michael Haggerty <mh...@alum.mit.edu>.
Done.  Thanks for pointing this out.

Michael

Daniel Rall wrote:
> I think you meant "pred.cond", rather than "pred.conv" in the change
> log message.  Mind updating it?
> 
> On Fri, 07 Apr 2006, mhagger@tigris.org wrote:
>>Author: mhagger
>>Date: Fri Apr  7 16:56:47 2006
>>New Revision: 19246
>>
>>Modified:
>>   trunk/subversion/tests/cmdline/svntest/main.py
>>
>>Log:
>>Handle Skip conditions by throwing exception.
>>
>>* subversion/tests/cmdline/svntest/main.py (TestRunner.run): Check for
>>  pred.conv within the try...except and if it is true, just raise a
>>  Skip exception.  This is then handled the same way as a Skip thrown
>>  by the test itself.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org