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

Re: [PATCH] 1.5.x branch: python/cmdline

From: Alexander Sinyushkin <Alexander.Sinyushkin_at_svnkit.com>
Date: Fri, 30 May 2008 17:04:29 +0700

Ok, guys, thank you all for your comments on the patch. I have
taken into account Lieven's proposals and modified my main.py patch for
trunk - the attached patch sets SVN_CURRENT_TEST only when --use-jsvn is
specified.
And I made my code lines not to exceed over 80 characters.

Now the log message:

[[[
Add a number of SVNKit related fixes to main.py

Make use_jsvn a global variable which if True allows
SVN_CURRENT_TEST SVNKit specific environment variable
be set to the current running test.

svndumpfilter_binary should point to a jsvndumpfilter binary if
--use-jsvn is specified.

* subversion/tests/cmdline/svntest/main.py
   (use_jsvn): make use_jsvn a global variable that reflects
               whether --use-jsvn is passed or not; do not
               set use_jsvn to False at the end of if use_jsvn:
               clause
   (copy_repos): close dump_in just after the first call to
                 open_pipe()
   (run): if use_jsvn is True set SVN_CURRENT_TEST environment
          variable to the current test being run
   (run_tests): make svndumpfilter_binary point to jsvndumpfilter
                binary if use_jsvn is True
]]]

Thanks in advance for any help.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
Lieven Govaerts wrote:
> Alexander Sinyushkin wrote:
>> Sorry, here it is
>>
>> [[[
>> Add a number of SVNKit related fixes to main.py
>>
>> Recently SVNKit developers have started to use client/server approach
>> for running Subversion python tests suite against SVNKit Subversion
>> library. They use a server that accepts Subversion commands through
>> the TCP/IP socket and a client which is a bash script - it reads
>> parameters, stdin, certain environment variables and then sends
>> everything to the server.
>>
>> To send data to the server netcat program is used or, alternatively,
>> bash /dev/tcp/host/port device. In both case complete stdin have to be
>> read before sending data to the server. However, main.py doesn't close
>> stdin of the launched process before launching another process (in
>> particular when running svnadmin dump repos1 | svnadmin load repos2
>> commands). As a result the tests were entering a deadlock. Suggested
>> patch doesn't change anything in tests behavior with native Subversion
>> - it just closes stdin of the launched process as soon as no more data
>> is about to be sent to the process stdin.
>>
>> Another modification included into this patch is setting
>> SVN_CURRENT_TEST environment variable before running certain test. This
>> allows SVNKit testing daemon to track what test is currently running
>> when the whole test suite is launched (i.e. "./copy.py" without
>> specifying exact test number to run).
>>
>> Finally, svndumpfilter_binary should point to a jsvndumpfilter binary
>> if --use-jsvn is specified.
>>
>> * subversion/tests/cmdline/svntest/main.py
>>   (def copy_repos): close dump_in just after the first call to
>> open_pipe()
>>   (def run): set SVN_CURRENT_TEST environment variable to the current
>> test being run
>>   (def run_tests): make svndumpfilter_binary point to jsvndumpfilter
>> binary if --use-jsvn is specified
>> ]]]
> As Daniel said, our log messages are normally a bit shorter ;) Just a
> few of the key phrases should be sufficient.
> 
> For the SVN_CURRENT_TEST variable, I propose to make it '--use-jsvn'
> specific. We probably won't need this environment variable for ourself
> in the foreseeable future. I really don't mind a bit of jsvn-specific
> code in our test suite. BTW, that line where you set the environment
> variable is more than 80 characters long. Whoever is committing this
> should fix that before committing.
> 
> Lieven
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
> 
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-30 12:05:09 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.