Patchwork [1,of,2,V3,stable] run-tests: checks behaviour of test on failure while testing

login
register
mail settings
Submitter Anurag Goel
Date June 13, 2014, 9:24 a.m.
Message ID <ef9bd057d520d30d993c.1402651461@ubuntu.ubuntu-domain>
Download mbox | patch
Permalink /patch/4985/
State Accepted
Commit b7baef94a3331b02db194ed8b64ae699dd9108c8
Headers show

Comments

Anurag Goel - June 13, 2014, 9:24 a.m.
# HG changeset patch
# User anuraggoel <anurag.dsps@gmail.com>
# Date 1402650182 -19800
#      Fri Jun 13 14:33:02 2014 +0530
# Node ID ef9bd057d520d30d993c73f4b3b65e3c908039b3
# Parent  e167dbc563e334d774952a65bf7c1f0d0d96441f
run-tests: checks behaviour of test on failure while testing

On failure while testing, if this function "result.addFailure(self, str(e))"
returns true then test get 'passed' else count as 'failed'.

Patch

diff -r e167dbc563e3 -r ef9bd057d520 tests/run-tests.py
--- a/tests/run-tests.py	Fri Jun 13 13:25:28 2014 +0530
+++ b/tests/run-tests.py	Fri Jun 13 14:33:02 2014 +0530
@@ -466,7 +466,8 @@ 
                 # the stack trace. This is for historical reasons and
                 # this decision could be revisted in the future,
                 # especially for PythonTest instances.
-                result.addFailure(self, str(e))
+                if result.addFailure(self, str(e)):
+                    success = True
             except Exception:
                 result.addError(self, sys.exc_info())
             else: