You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2010/11/09 18:20:55 UTC

Re: [PATCH] Fix Windows test failures - Python test suite bug in quoting a trailing backslash

Julian Foad wrote on Tue, Nov 09, 2010 at 12:07:16 +0000:
> (We like to be able to copy and paste and run the displayed command.)

I recall two oddities (at least in -v mode) in the Python tests:

* Sometimes they gave to absolute path to atomic-ra-revprop-change (the
  compiled helper) and sometimes just its basename.

* Arguments containing spaces weren't always quoted properly.

Here's an example (after changing atomic_over_ra()'s expectations
such that it FAILs):

% ./prop_tests.py -v 34
CMD: atomic-ra-revprop-change file:///home/daniel/src/svn/t20/subversion/tests/cmdline/svn-test-work/repositories/prop_tests-34 0 flower "( 11 old_value_p 0  5 value 11 wrong value )" serf 0
CMD: /home/daniel/src/svn/t20/subversion/tests/cmdline/atomic-ra-revprop-change file:///home/daniel/src/svn/t20/subversion/tests/cmdline/svn-test-work/repositories/prop_tests-34 0 flower ( 11 old_value_p 0  5 value 11 wrong value ) serf 0 exited with 1

Ideally, I'd want this:

CMD: /home/daniel/src/svn/t20/subversion/tests/cmdline/atomic-ra-revprop-change
file:///home/daniel/src/svn/t20/subversion/tests/cmdline/svn-test-work/repositories/prop_tests-34
0 flower "( 11 old_value_p 0  5 value 11 wrong value )" serf 0

plus some indication of the exit code if appropriate.


Haven't tested with your patch yet, sorry.  If it doesn't cover that,
I can take a look later.

Daniel

Re: [PATCH] Fix Windows test failures - Python test suite bug in quoting a trailing backslash

Posted by Julian Foad <ju...@wandisco.com>.
On Tue, 2010-11-09 at 20:20 +0200, Daniel Shahaf wrote:
> Julian Foad wrote on Tue, Nov 09, 2010 at 12:07:16 +0000:
> > (We like to be able to copy and paste and run the displayed command.)
> 
> I recall two oddities (at least in -v mode) in the Python tests:
> 
> * Sometimes they gave to absolute path to atomic-ra-revprop-change (the
>   compiled helper) and sometimes just its basename.

Hi Daniel.  For progress indications, the test suite intentionally shows
only the basename of the executable.  For error reports, it shows the
full path.  I'm not changing that.

> * Arguments containing spaces weren't always quoted properly.

My patch should fix the quoting so that the command is shown in a
suitable form for copying and pasting as input to the local system's
shell, using MSCRT shell quoting rules on Windows and a sh-like shell on
non-Windows systems.

- Julian


> Here's an example (after changing atomic_over_ra()'s expectations
> such that it FAILs):
> 
> % ./prop_tests.py -v 34
> CMD: atomic-ra-revprop-change file:///home/daniel/src/svn/t20/subversion/tests/cmdline/svn-test-work/repositories/prop_tests-34 0 flower "( 11 old_value_p 0  5 value 11 wrong value )" serf 0
> CMD: /home/daniel/src/svn/t20/subversion/tests/cmdline/atomic-ra-revprop-change file:///home/daniel/src/svn/t20/subversion/tests/cmdline/svn-test-work/repositories/prop_tests-34 0 flower ( 11 old_value_p 0  5 value 11 wrong value ) serf 0 exited with 1
> 
> Ideally, I'd want this:
> 
> CMD: /home/daniel/src/svn/t20/subversion/tests/cmdline/atomic-ra-revprop-change
> file:///home/daniel/src/svn/t20/subversion/tests/cmdline/svn-test-work/repositories/prop_tests-34
> 0 flower "( 11 old_value_p 0  5 value 11 wrong value )" serf 0
> 
> plus some indication of the exit code if appropriate.
> 
> 
> Haven't tested with your patch yet, sorry.  If it doesn't cover that,
> I can take a look later.