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

Re: svn commit: r1688511 - /subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 1 Jul 2015 02:13:54 +0000

It looks like this patch accidentally removes a line from the test?


Bert








From: Stefan Fuhrmann
Sent: ‎Tuesday‎, ‎June‎ ‎30‎, ‎2015 ‎9‎:‎50‎ ‎PM
To: commits_at_subversion.apache.org





Author: stefan2
Date: Tue Jun 30 19:50:46 2015
New Revision: 1688511

URL: http://svn.apache.org/r1688511
Log:
Fix svnadmin_tests.py 52 failures with pre-cooked repositories.

Reported by: brane

* subversion/tests/cmdline/svnadmin_tests.py
  (is_sharded): New utility function.
  (fsfs_pack_non_sharded): Skip test if the repo is sharded after all.
                           Also get rid of the useless patch_format call.

Modified:
    subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py?rev=1688511&r1=1688510&r2=1688511&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py Tue Jun 30 19:50:46 2015
@@ -249,6 +249,18 @@ def patch_format(repo_dir, shard_size):
   os.chmod(format_path, 0666)
   open(format_path, 'wb').write(new_contents)
 
+def is_sharded(repo_dir):
+ """Return whether the FSFS repository REPO_DIR is sharded."""
+
+ format_path = os.path.join(repo_dir, "db", "format")
+ contents = open(format_path, 'rb').read()
+
+ for line in contents.split("\n"):
+ if line.startswith("layout sharded"):
+ return True
+
+ return False
+
 def load_and_verify_dumpstream(sbox, expected_stdout, expected_stderr,
                                revs, check_props, dump, *varargs):
   """Load the array of lines passed in DUMP into the current tests'
@@ -3074,7 +3086,10 @@ def fsfs_pack_non_sharded(sbox):
   # Configure two files per shard to trigger packing.
   sbox.build(create_wc = False,
              minor_version = min(svntest.main.options.server_minor_version,3))
- patch_format(sbox.repo_dir, shard_size=2)
+
+ # Skip for pre-cooked sharded repositories
+ if is_sharded(sbox.repo_dir):
+ raise svntest.Skip('sharded pre-cooked repository')
 
   svntest.actions.run_and_verify_svnadmin(
       None, [], "upgrade", sbox.repo_dir)
Received on 2015-07-01 04:14:56 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.