You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2015/01/15 11:48:51 UTC
svn commit: r1652040 -
/subversion/trunk/subversion/tests/cmdline/svntest/main.py
Author: philip
Date: Thu Jan 15 10:48:51 2015
New Revision: 1652040
URL: http://svn.apache.org/r1652040
Log:
* subversion/tests/cmdline/svntest/main.py
(run_command_stdin): Ensure valgrind diagnostics for a command that is
expected to fail cause the test to fail.
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/main.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1652040&r1=1652039&r2=1652040&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Thu Jan 15 10:48:51 2015
@@ -544,6 +544,15 @@ def run_command_stdin(command, error_exp
and not any(map(lambda arg: 'prop_tests-12' in arg, varargs)):
raise Failure("Repository diskpath in %s: %r" % (name, lines))
+ valgrind_diagnostic = False
+ # A valgrind diagnostic will raise a failure if the command is
+ # expected to run without error. When an error is expected any
+ # subsequent error pattern matching is usually lenient and will not
+ # detect the diagnostic so make sure a failure is raised here.
+ if error_expected and stderr_lines:
+ if any(map(lambda arg: re.match('==[0-9]+==', arg), stderr_lines)):
+ valgrind_diagnostic = True
+
stop = time.time()
logger.info('<TIME = %.6f>' % (stop - start))
for x in stdout_lines:
@@ -551,7 +560,8 @@ def run_command_stdin(command, error_exp
for x in stderr_lines:
logger.info(x.rstrip())
- if (not error_expected) and ((stderr_lines) or (exit_code != 0)):
+ if (((not error_expected) and ((stderr_lines) or (exit_code != 0)))
+ or valgrind_diagnostic):
for x in stderr_lines:
logger.warning(x.rstrip())
if len(varargs) <= 5: