[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: Mon, 9 Nov 2009 17:25:16 -0500

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).

Paul

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415934

Received on 2009-11-09 23:25:29 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.