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

Re: svn commit: r40320 - trunk/subversion/tests/cmdline

From: Paul Burba <ptburba_at_gmail.com>
Date: Fri, 13 Nov 2009 12:09:06 -0500

On Fri, Nov 13, 2009 at 11:25 AM, Lieven Govaerts <svnlgo_at_mobsol.be> wrote:
> On Fri, Nov 13, 2009 at 4:36 PM, Arfrever Frehtes Taifersar Arahesis
> <Arfrever.FTA_at_gmail.com> wrote:
>> 2009-11-09 23:25:16 Paul Burba napisał(a):
>>> On Fri, Oct 30, 2009 at 8:56 PM, Arfrever Frehtes Taifersar Arahesis
>>> <Arfrever.FTA_at_gmail.com> wrote:
>>> > Author: arfrever
>>> > Date: Fri Oct 30 18:56:23 2009
>>> > New Revision: 40320
>>> >
>>> > Log:
>>> > * subversion/tests/cmdline/upgrade_tests.py
>>> >  (get_current_format): Get current format by parsing subversion/libsvn_wc/wc.h.
>>> >
>>> > Modified:
>>> >   trunk/subversion/tests/cmdline/upgrade_tests.py
>>> >
>>> > Modified: trunk/subversion/tests/cmdline/upgrade_tests.py
>>> > URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/upgrade_tests.py?pathrev=40320&r1=40319&r2=40320
>>> > ==============================================================================
>>> > --- trunk/subversion/tests/cmdline/upgrade_tests.py     Fri Oct 30 12:52:28 2009        (r40319)
>>> > +++ trunk/subversion/tests/cmdline/upgrade_tests.py     Fri Oct 30 18:56:23 2009        (r40320)
>>> > @@ -29,7 +29,11 @@
>>> >  # moves working copies between wc-1 and wc-ng.
>>> >  #
>>> >
>>> > -import os, sys, tarfile, shutil
>>> > +import os
>>> > +import re
>>> > +import shutil
>>> > +import sys
>>> > +import tarfile
>>> >
>>> >  import svntest
>>> >
>>> > @@ -42,8 +46,9 @@ wc_is_too_old_regex = (".*Working copy f
>>> >
>>> >
>>> >  def get_current_format():
>>> > -  ### parse this from libsvn_wc/wc.h
>>> > -  return 15
>>> > +  # Get current format from subversion/libsvn_wc/wc.h
>>> > +  format_file = open(os.path.join(os.path.dirname(__file__), "..", "..", "libsvn_wc", "wc.h")).read()
>>> > +  return int(re.search("\n#define SVN_WC__VERSION (\d+)\n", format_file).group(1))
>>>
>>> Hi Arfrever,
>>>
>>> This is certainly more convenient in when running the tests in their
>>> entirety (e.g. via win-tests.py on Windows), but causes spurious
>>> failures of upgrade_tests.py 1 and 2 when running them individually
>>> outside of the test harness (see attached test run).
>>
>> I can't reproduce this problem on GNU/Linux. Does C:\SVN\src-trunk\Debug\subversion\tests\cmdline\..\..\libsvn_wc\wc.h exist?

No, the standard Debug and Release folders produced when building on
Windows with Visual Studio don't contain any header files.

> I'd guess that Paul is using the 'copy the tests/cmdline folder to
> Debug/subversion' trick to make the tests use the Debug binaries.

That is indeed what I am doing, though I do it for release builds too.
 It allows me to run an individual python test and see the results
immediately, no log to deal with.

Out of curiosity Lieven, if you want to run a single python test how
do you do it on Windows? Maybe I've been going about this all wrong.

Paul

> It is also possible to run the tests outside of the source tree, so I
> suggest to keep the "return 15" as a fallback in case wc.h isn't
> found.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2417648
Received on 2009-11-13 18:09:21 CET

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.