You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2017/12/02 16:04:37 UTC
svn commit: r1816967 - in
/subversion/trunk/subversion/tests/cmdline/svntest: main.py verify.py
Author: stefan2
Date: Sat Dec 2 16:04:37 2017
New Revision: 1816967
URL: http://svn.apache.org/viewvc?rev=1816967&view=rev
Log:
Fix test expectations regarding dump files for repositories that don't
store SHA1 checksums.
* subversion/tests/cmdline/svntest/main.py
(fs_has_sha1): New capability check function.
* subversion/tests/cmdline/svntest/verify.py
(DumpParser): Set SHA1 values to None when asked to.
(compare_dump_files): Don't expect SHA1 values for old repo formats.
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/main.py
subversion/trunk/subversion/tests/cmdline/svntest/verify.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1816967&r1=1816966&r2=1816967&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Sat Dec 2 16:04:37 2017
@@ -1574,6 +1574,9 @@ def is_fs_log_addressing():
return is_fs_type_fsx() or \
(is_fs_type_fsfs() and options.server_minor_version >= 9)
+def fs_has_sha1():
+ return fs_has_rep_sharing()
+
def fs_has_rep_sharing():
return is_fs_type_fsx() or \
(is_fs_type_fsfs() and options.server_minor_version >= 6)
Modified: subversion/trunk/subversion/tests/cmdline/svntest/verify.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/verify.py?rev=1816967&r1=1816966&r2=1816967&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/verify.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/verify.py Sat Dec 2 16:04:37 2017
@@ -29,7 +29,7 @@ from difflib import unified_diff, ndiff
import pprint
import logging
-import svntest
+import svntest, main
logger = logging.getLogger()
@@ -467,10 +467,11 @@ def verify_exit_code(message, actual, ex
# A simple dump file parser. While sufficient for the current
# testsuite it doesn't cope with all valid dump files.
class DumpParser:
- def __init__(self, lines):
+ def __init__(self, lines, ignore_sha1=False):
self.current = 0
self.lines = lines
self.parsed = {}
+ self.ignore_sha1 = ignore_sha1
def parse_line(self, regex, required=True):
m = re.match(regex, self.lines[self.current])
@@ -660,6 +661,9 @@ class DumpParser:
if not header in headers:
node[key] = None
continue
+ if self.ignore_sha1 and (key in ['copy_sha1', 'text_sha1']):
+ node[key] = None
+ continue
m = re.match(regex, headers[header])
if not m:
raise SVNDumpParseError("expected '%s' at line %d\n%s"
@@ -735,8 +739,7 @@ def compare_dump_files(message, label, e
of lines as returned by run_and_verify_dump, and check that the same
revisions, nodes, properties, etc. are present in both dumps.
"""
-
- parsed_expected = DumpParser(expected).parse()
+ parsed_expected = DumpParser(expected, not main.fs_has_sha1()).parse()
parsed_actual = DumpParser(actual).parse()
if ignore_uuid: