[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-04-14 01:14:05 CEST

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:
>

  • application/pgp-signature attachment: stored
Received on Fri Apr 14 01:14:48 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.