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

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

From: Brian W. Fitzpatrick <fitz_at_red-bean.com>
Date: 2004-08-06 18:14:44 CEST

========
Summary:

In cvs2svn, we're using the svntest test suite (via externals!). I just
added a skipped test yesterday, and now when our test script (called
run-tests.py) is invoked vi make, we get an error:

$ make check
./run-tests.py
...
SKIP: run-tests.py 27: non ascii files converted incorrectly
...
make: *** [check] Error 1

It turns out, as Christian Schaffner discovered, that svntest is
returning non-zero (2 to be exact) whenever it encounters a test that
raise a Skip exception.

=========
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).

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
Received on Fri Aug 6 18:16:05 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.