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

Re: Scary test suite issue!

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Thu, 07 Feb 2008 01:05:02 -0800

Lieven Govaerts wrote:
> C. Michael Pilato wrote:
>> So, I'm noticing something odd as of late in our test suite. Given a
>> merge test that expects some bit of output and gets a different bit,
>> an error is raised (as expected). But if *no* output is generated, no
>> error is raised. That is striking me as really, really bad.
>
> Yep, that seems to be the case.
>>
>> I don't know the cause, and I'm busy with other semi-related tasks
>> right now, but wanted to let folks know, because the reliability of
>> our test suite is no small matter of importance (as I'm sure you'd all
>> agree).
>>
>
> I find that attached patch solves the issue:
>
> ------------------------------------------------------------------------
> Index: subversion/tests/cmdline/svntest/verify.py
> ===================================================================
> --- subversion/tests/cmdline/svntest/verify.py (revision 29217)
> +++ subversion/tests/cmdline/svntest/verify.py (working copy)
> @@ -131,6 +131,12 @@ class ExpectedOutput:
> all_lines_match_re = True
> else:
> all_lines_match_re = False
> +
> + # If a regex was provided assume that we actually require
> + # some output. Fail if we don't.
> + if len(actual) == 0:
> + return False
> +
> for i in range(0, len(actual)):
> if self.match_all:
> if not self.is_equivalent_line(expected_re, actual[i]):
> -------------------------------------------------------------------------
>
> Basically here we loop over all actual output lines and try to match
> them with either all or any (depends on match_all setting) expected
> output line(s). If there are no actual output lines we don't loop and
> return True or False depending on what was specified for match_all.
>
> I assume that once we pass a regular expression as expected output, we
> require at least some actual output. I'm running the test suite now, for
> now it doesn't seem to have any negative consequences.
>
> Lieven

+1 to commit, pending success of the test suite.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-02-07 10:05:13 CET

This is an archived mail posted to the Subversion Dev mailing list.