You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@davidglasser.net> on 2007/10/09 06:22:30 UTC

Re: svn commit: r27032 - in trunk/subversion/tests/cmdline: . svntest

On 10/8/07, pburba@tigris.org <pb...@tigris.org> wrote:
> Author: pburba
> Date: Mon Oct  8 19:25:13 2007
> New Revision: 27032
>
> Log:
> Make verify.py match *all* lines of acutal output to regex expected output.
>
> Previously, verify.py's regex verification of expected output would pass if
> *only* one of potentially several lines of actual output matched the regex.
> This is a recipe for writing tests that spuriously pass.  With this patch
> *all* of the lines of stdout must match the expected regex.  Expected stderr
> still behaves in the old way (only one line need match) as we rely on this
> quite frequently (i.e. we look for just one key part of an error message).
>
> * subversion/tests/cmdline/depth_tests.py
>   (def depth_empty_checkout, depth_files_same_as_nonrecursive,
>   depth_mixed_bring_in_dir, depth_update_to_more_depth,
>   depth_immediates_receive_new_dir, upgrade_from_above):
> * subversion/tests/cmdline/lock_tests.py
>   (ls_url_encoded):
> * subversion/tests/cmdline/stat_tests.py
>   (status_ignored_dir):
> * subversion/tests/cmdline/switch_tests.py
>   (relocate_beyond_repos_root):
>   Tweak expected stdout regular expressions passed to
>   svntest.actions.run_and_verify_svn to match all output.
>
> * subversion/tests/cmdline/merge_tests.py
>   (expected_merge_output): Add an optional argument to get the standard 3-way
>   merge notification.  Minor whitespace fix.
>   (merge_binary_with_common_ancestry): Update call to
>   expected_merge_output().
>   (merge_with_child_having_different_rev_ranges_to_merge): Use the correct
>   path when constructing the expected output (this is the exact type of thing
>   this patch would have caught a long time ago).
>
> * subversion/tests/cmdline/svntest/main.py
>   (merge_notify_line): Add an optional argument to get the standard 3-way
>   merge notification.
>
> * subversion/tests/cmdline/svntest/verify.py
>   (createExpectedOutput): Add match_all argument allowing RegexOutput to be
>   created that require all output lines to match the expected regex, rather
>   than just one line.
>   (ExpectedOutput:__init__): Add new self flag indicating if the expected
>   output represents a regular expression.
>   (is_equivalent_list): Support the case where expected output is a regular
>   expression and we want to check that all actual output lines match it.
>   (RegexOutput:__init__): Override ExpectedOutput.__init__
>   (compare_and_display_lines): Update calls to createExpectedOutput().
>
> * subversion/tests/cmdline/update_tests.py
>   (mergeinfo_update_elision): Properly escape Win32 path in expected out
>   regex now that we are really going to require that it match the actual
>   output.
>
> Modified:
>    trunk/subversion/tests/cmdline/depth_tests.py
>    trunk/subversion/tests/cmdline/lock_tests.py
>    trunk/subversion/tests/cmdline/merge_tests.py
>    trunk/subversion/tests/cmdline/stat_tests.py
>    trunk/subversion/tests/cmdline/svntest/main.py
>    trunk/subversion/tests/cmdline/svntest/verify.py
>    trunk/subversion/tests/cmdline/switch_tests.py
>    trunk/subversion/tests/cmdline/update_tests.py
>
> Modified: trunk/subversion/tests/cmdline/depth_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/depth_tests.py?pathrev=27032&r1=27031&r2=27032
> ==============================================================================
> --- trunk/subversion/tests/cmdline/depth_tests.py       (original)
> +++ trunk/subversion/tests/cmdline/depth_tests.py       Mon Oct  8 19:25:13 2007
> @@ -109,9 +109,16 @@
>    if os.path.exists(os.path.join(wc_empty, "A")):
>      raise svntest.Failure("depth-empty checkout created subdir 'A'")
>
> +#  escaped_exp = '^URL: ' + re.escape(other_A_url) + '$' \
> +#                '|Path.+|Repository.+|Revision.+|Node.+|Last.+|\n'
> +#  svntest.actions.run_and_verify_svn(None, escaped_exp, [],
> +#                                     'info', '-rHEAD', A_wc_dir)
> +

Did you mean to include this commented block?

--dave


-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r27032 - in trunk/subversion/tests/cmdline: . svntest

Posted by Paul Burba <pb...@collab.net>.
> -----Original Message-----
> From: dglasser@gmail.com [mailto:dglasser@gmail.com] On 
> Behalf Of David Glasser
> Sent: Tuesday, October 09, 2007 2:23 AM
> To: dev@subversion.tigris.org; pburba@tigris.org
> Subject: Re: svn commit: r27032 - in 
> trunk/subversion/tests/cmdline: . svntest
> 
> On 10/8/07, pburba@tigris.org <pb...@tigris.org> wrote:
> > Author: pburba
> > Date: Mon Oct  8 19:25:13 2007
> > New Revision: 27032
> >
> > Log:
> > Make verify.py match *all* lines of acutal output to regex 
> expected output.

<snip>

> http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/depth_
> > tests.py?pathrev=27032&r1=27031&r2=27032
> > 
> ==============================================================
> ================
> > --- trunk/subversion/tests/cmdline/depth_tests.py       (original)
> > +++ trunk/subversion/tests/cmdline/depth_tests.py       Mon 
> Oct  8 19:25:13 2007
> > @@ -109,9 +109,16 @@
> >    if os.path.exists(os.path.join(wc_empty, "A")):
> >      raise svntest.Failure("depth-empty checkout created 
> subdir 'A'")
> >
> > +#  escaped_exp = '^URL: ' + re.escape(other_A_url) + '$' \
> > +#                '|Path.+|Repository.+|Revision.+|Node.+|Last.+|\n'
> > +#  svntest.actions.run_and_verify_svn(None, escaped_exp, [],
> > +#                                     'info', '-rHEAD', A_wc_dir)
> > +
> 
> Did you mean to include this commented block?
> 
> --dave

Oh, that?  I plead guilty to committing under the influence of lack of
sleep.  Gone r27043.

Thanks for spotting that,

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org