Patchwork [1,of,3,stable] run-tests: produce error on running a failing test

login
register
mail settings
Submitter Anurag Goel
Date June 9, 2014, 7:53 p.m.
Message ID <d64f282d66fd0a66a8ac.1402343639@ubuntu.ubuntu-domain>
Download mbox | patch
Permalink /patch/4955/
State Superseded
Commit 5ee547fdb0be67ed97eb737d5feda2932d3dfb93
Headers show

Comments

Anurag Goel - June 9, 2014, 7:53 p.m.
# HG changeset patch
# User anuraggoel <anurag.dsps@gmail.com>
# Date 1402340755 -19800
#      Tue Jun 10 00:35:55 2014 +0530
# Node ID d64f282d66fd0a66a8acb6bcb0d34b8b72bffba8
# Parent  bff9783d73937cea1da193e42171f9bade884a98
run-tests: produce error on running a failing test

Whenever failure occurs while testing, this patch produce an error with a
message having failure testfile name and also '!' mark.
Pierre-Yves David - June 10, 2014, 10:01 p.m.
On 06/09/2014 12:53 PM, Anurag Goel wrote:
> # HG changeset patch
> # User anuraggoel <anurag.dsps@gmail.com>
> # Date 1402340755 -19800
> #      Tue Jun 10 00:35:55 2014 +0530
> # Node ID d64f282d66fd0a66a8acb6bcb0d34b8b72bffba8
> # Parent  bff9783d73937cea1da193e42171f9bade884a98
> run-tests: produce error on running a failing test
>
> Whenever failure occurs while testing, this patch produce an error with a
> message having failure testfile name and also '!' mark.

Please specify that this  fixes a regression recently introduced by a 
refactoring


> diff -r bff9783d7393 -r d64f282d66fd tests/run-tests.py
> --- a/tests/run-tests.py	Mon Jun 09 23:39:00 2014 +0530
> +++ b/tests/run-tests.py	Tue Jun 10 00:35:55 2014 +0530
> @@ -1075,6 +1075,9 @@
>
>           if self._options.first:
>               self.stop()
> +        else:
> +            self.stream.write('\nERROR: %s output changed\n' % test)
> +            self.stream.write('!')

This change breaks the --nodiff test (last patch of the series)

The ERROR line is not expected in the no diff case.



Note that this patch is doing two different thing and should actually be 
two patches

Patch

diff -r bff9783d7393 -r d64f282d66fd tests/run-tests.py
--- a/tests/run-tests.py	Mon Jun 09 23:39:00 2014 +0530
+++ b/tests/run-tests.py	Tue Jun 10 00:35:55 2014 +0530
@@ -1075,6 +1075,9 @@ 
 
         if self._options.first:
             self.stop()
+        else:
+            self.stream.write('\nERROR: %s output changed\n' % test)
+            self.stream.write('!')
 
     def addError(self, *args, **kwargs):
         super(TestResult, self).addError(*args, **kwargs)