From cf46733632c7279a9fd0fe6ce26f9185a4ae82a9 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sat, 5 Aug 2017 16:22:51 +0000 Subject: subversion-1.9.7 --- subversion/tests/cmdline/svntest/main.py | 492 +++++++++++++++++++++++-------- 1 file changed, 368 insertions(+), 124 deletions(-) (limited to 'subversion/tests/cmdline/svntest/main.py') diff --git a/subversion/tests/cmdline/svntest/main.py b/subversion/tests/cmdline/svntest/main.py index 0d1ca91..de59c06 100644 --- a/subversion/tests/cmdline/svntest/main.py +++ b/subversion/tests/cmdline/svntest/main.py @@ -36,6 +36,7 @@ import xml import urllib import logging import hashlib +import zipfile from urlparse import urlparse try: @@ -53,7 +54,7 @@ import svntest from svntest import Failure from svntest import Skip -SVN_VER_MINOR = 8 +SVN_VER_MINOR = 9 ###################################################################### # @@ -111,7 +112,7 @@ class SVNRepositoryCreateFailure(Failure): # Windows specifics if sys.platform == 'win32': windows = True - file_scheme_prefix = 'file:' + file_scheme_prefix = 'file:///' _exe = '.exe' _bat = '.bat' os.environ['SVN_DBG_STACKTRACES_TO_STDERR'] = 'y' @@ -131,6 +132,10 @@ else: wc_author = 'jrandom' wc_passwd = 'rayjandom' +# Username and password used by svnrdump in dump/load cross-checks +crosscheck_username = '__dumpster__' +crosscheck_password = '__loadster__' + # Username and password used by the working copies for "second user" # scenarios wc_author2 = 'jconstant' # use the same password as wc_author @@ -141,23 +146,30 @@ stack_trace_regexp = r'(?:.*subversion[\\//].*\.c:[0-9]*,$|.*apr_err=.*)' os.environ['LC_ALL'] = 'C' ###################################################################### -# The locations of the svn, svnadmin and svnlook binaries, relative to -# the only scripts that import this file right now (they live in ../). +# The locations of the svn binaries. # Use --bin to override these defaults. -svn_binary = os.path.abspath('../../svn/svn' + _exe) -svnadmin_binary = os.path.abspath('../../svnadmin/svnadmin' + _exe) -svnlook_binary = os.path.abspath('../../svnlook/svnlook' + _exe) -svnrdump_binary = os.path.abspath('../../svnrdump/svnrdump' + _exe) -svnsync_binary = os.path.abspath('../../svnsync/svnsync' + _exe) -svnversion_binary = os.path.abspath('../../svnversion/svnversion' + _exe) -svndumpfilter_binary = os.path.abspath('../../svndumpfilter/svndumpfilter' + \ - _exe) -svnmucc_binary=os.path.abspath('../../svnmucc/svnmucc' + _exe) -entriesdump_binary = os.path.abspath('entries-dump' + _exe) -atomic_ra_revprop_change_binary = os.path.abspath('atomic-ra-revprop-change' + \ - _exe) -wc_lock_tester_binary = os.path.abspath('../libsvn_wc/wc-lock-tester' + _exe) -wc_incomplete_tester_binary = os.path.abspath('../libsvn_wc/wc-incomplete-tester' + _exe) +def P(relpath, + head=os.path.dirname(os.path.dirname(os.path.abspath('.'))) + ): + if sys.platform=='win32': + return os.path.join(head, relpath + '.exe') + else: + return os.path.join(head, relpath) +svn_binary = P('svn/svn') +svnadmin_binary = P('svnadmin/svnadmin') +svnlook_binary = P('svnlook/svnlook') +svnrdump_binary = P('svnrdump/svnrdump') +svnsync_binary = P('svnsync/svnsync') +svnversion_binary = P('svnversion/svnversion') +svndumpfilter_binary = P('svndumpfilter/svndumpfilter') +svnmucc_binary = P('svnmucc/svnmucc') +svnfsfs_binary = P('svnfsfs/svnfsfs') +entriesdump_binary = P('tests/cmdline/entries-dump') +lock_helper_binary = P('tests/cmdline/lock-helper') +atomic_ra_revprop_change_binary = P('tests/cmdline/atomic-ra-revprop-change') +wc_lock_tester_binary = P('tests/libsvn_wc/wc-lock-tester') +wc_incomplete_tester_binary = P('tests/libsvn_wc/wc-incomplete-tester') +del P ###################################################################### # The location of svnauthz binary, relative to the only scripts that @@ -539,6 +551,15 @@ def run_command_stdin(command, error_expected, bufsize=-1, binary_mode=False, and not any(map(lambda arg: 'prop_tests-12' in arg, varargs)): raise Failure("Repository diskpath in %s: %r" % (name, lines)) + valgrind_diagnostic = False + # A valgrind diagnostic will raise a failure if the command is + # expected to run without error. When an error is expected any + # subsequent error pattern matching is usually lenient and will not + # detect the diagnostic so make sure a failure is raised here. + if error_expected and stderr_lines: + if any(map(lambda arg: re.match('==[0-9]+==', arg), stderr_lines)): + valgrind_diagnostic = True + stop = time.time() logger.info('