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

Re: [PATCH] Prevent false negative results of "make check" in Python tests

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 12 Dec 2012 22:06:34 +0200

Andreas Stieger wrote on Wed, Dec 12, 2012 at 20:01:11 +0000:
> Hello,
>
> discussed on IRC, the patch below changes the test harness to prevent
> some false negatives when running the test suite. Specifically, if a
> python test initialisation returns in such a way that the test runner
> doesn't know how to handle the result, change to code to return a
> non-zero exit code like and, subsequently, have "make check" fail
> correctly. Reproducible by using Python < 2.5 or missing sqlite3 Python
> bindings, exit triggered by
> subversion/tests/cmdline/svntest/__init__.py. danielsh,breser hinted +1
> for this on IRC.

Go ahead and commit. It's an error path that no one should be running
into; you run into it, and you have 2 +1's, so it's a no brainer. If
anyone have issues I trust they'll do a post-commit review.

>
> [[[
> Prevent false negative results of "make check" in Python tests
>
> * build/run_tests.py
> (_run_py_test): exit non-zero like _run_c_test
> ]]]
>
> With kind regards,
> Andreas Stieger

> Index: build/run_tests.py
> ===================================================================
> --- build/run_tests.py (revision 1420930)
> +++ build/run_tests.py (working copy)
> @@ -434,7 +434,7 @@ class TestHarness:
> ('.py', 'U', imp.PY_SOURCE))
> except:
> print("Don't know what to do about " + progbase)
> - raise
> + sys.exit(1)
>
> import svntest.main
>
Received on 2012-12-12 21:07:21 CET

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.