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

Re: Test suite setting exit code to non-zero on skipped test

From: <kfogel_at_collab.net>
Date: 2004-08-06 17:12:05 CEST

"Brian W. Fitzpatrick" <fitz@red-bean.com> writes:
> =========
> Proposal:
>
> Is there any reason why we should return non-zero just for skipping a
> test? I can't see any reason why we need to error if we skip something,
> but perhaps someone here has a good reason (svn blame tells me that
> kfogel wrote the line that sets skips to non-zero).

The situation is more complex than that. The _Predicate class in
testcase.py uses the error number as an index into an array of action
strings (see _Predicate.run_text(), and see the r8649 diff).

This can be fixed, but the fix is more than just a one-line change...

-Karl

> My suggested patch is:
>
> ---------------------------------------------------------------
> Index: testcase.py
> ===================================================================
> --- testcase.py (revision 10504)
> +++ testcase.py (working copy)
> @@ -107,7 +107,7 @@
> print ex.__doc__
> sys.exit(255)
> except svntest.Skip, ex:
> - error = 2
> + error = 0
> except svntest.Failure, ex:
> error = 1
> # We captured Failure and its subclasses. We don't want to print
> ---------------------------------------------------------------
>
> Thotz?
> -Fitz
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 6 18:47:30 2004

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.