Modified: subversion/branches/fsx-1.10/tools/dist/backport_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dist/backport_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dist/backport_tests.py (original)
+++ subversion/branches/fsx-1.10/tools/dist/backport_tests.py Sun Jun 14
20:58:10 2015
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# py:encoding=utf-8
#
-# backport_tests.py: Test backport.pl
+# backport_tests.py: Test backport.pl or backport.py
#
# Subversion is a tool for revision control.
# See http://subversion.apache.org for more information.
@@ -25,6 +25,25 @@
# under the License.
######################################################################
+# We'd like to test backport.pl and backport.py the same way, and to reuse
+# the svntest Python harness. Since the latter standardizes argv parsing,
+# we can't use argv to determine whether .py or .pl should be tested. Thus,
+# we implement the tests themselves in this file, while two driver files
+# (backport_tests_pl.py and backport_tests_py.py) invoke this file set
+# to run either backport-suite implementation.
+#
+# ### Note: the two driver scripts use the same repository names in
+# ### svn-test-work. This is not ideal, but hopefully acceptable
+# ### temporarily until we switch over to backport.py and remove backport.pl.
+# ###
+# ### See svntest.testcase.FunctionTestCase.get_sandbox_name().
+try:
+ run_backport, run_conflicter
+except NameError:
+ raise Exception("Failure: %s should not be run directly, or the wrapper "
+ "does not define both run_backport() and run_conflicter()"
+ % __file__)
+
# General modules
import contextlib
import functools
@@ -58,8 +77,6 @@ Wimp = svntest.testcase.Wimp_deco
######################################################################
# Helper functions
-BACKPORT_PL = os.path.abspath(os.path.join(os.path.dirname(__file__),
- 'backport.pl'))
STATUS = 'branch/STATUS'
class BackportTest(object):
@@ -74,43 +91,44 @@ class BackportTest(object):
"""Return a decorator that: builds TEST_FUNC's sbox, creates
^/subversion/trunk, and calls TEST_FUNC, then compare its output to the
expected dump file named after TEST_FUNC."""
-
+
# .wraps() propagates the wrappee's docstring to the wrapper.
- @functools.wraps(test_func)
+ @functools.wraps(test_func)
def wrapped_test_func(sbox):
expected_dump_file = './%s.dump' % (test_func.func_name,)
sbox.build()
-
+
# r2: prepare ^/subversion/ tree
sbox.simple_mkdir('subversion', 'subversion/trunk')
sbox.simple_mkdir('subversion/tags', 'subversion/branches')
sbox.simple_move('A', 'subversion/trunk')
sbox.simple_move('iota', 'subversion/trunk')
sbox.simple_commit(message='Create trunk')
-
+
# r3: branch
sbox.simple_copy('subversion/trunk', 'branch')
sbox.simple_append('branch/STATUS', '')
sbox.simple_add('branch/STATUS')
sbox.simple_commit(message='Create branch, with STATUS file')
-
+
# r4: random change on trunk
sbox.simple_append('subversion/trunk/iota', 'First change\n')
sbox.simple_commit(message='First change')
-
+
# r5: random change on trunk
sbox.simple_append('subversion/trunk/A/mu', 'Second change\n')
sbox.simple_commit(message='Second change')
-
+
# Do the work.
test_func(sbox)
-
+
# Verify it.
verify_backport(sbox, expected_dump_file, self.uuid)
return wrapped_test_func
-def make_entry(revisions=None, logsummary=None, notes=None, branch=None,
votes=None):
+def make_entry(revisions=None, logsummary=None, notes=None, branch=None,
+ depends=None, votes=None):
assert revisions
if logsummary is None:
logsummary = "default logsummary"
@@ -122,6 +140,7 @@ def make_entry(revisions=None, logsummar
'logsummary': logsummary,
'notes': notes,
'branch': branch,
+ 'depends': depends,
'votes': votes,
}
@@ -139,10 +158,13 @@ def serialize_entry(entry):
# notes
' Notes: %s\n' % (entry['notes'],) if entry['notes'] else '',
-
+
# branch
' Branch: %s\n' % (entry['branch'],) if entry['branch'] else '',
+ # depends
+ ' Depends: %s\n' % (entry['depends'],) if entry['depends'] else '',
+
# votes
' Votes:\n',
''.join(' '
@@ -154,12 +176,15 @@ def serialize_entry(entry):
])
def serialize_STATUS(approveds,
+ candidates=[],
serialize_entry=serialize_entry):
"""Construct and return the contents of a STATUS file.
APPROVEDS is an iterable of ENTRY dicts. The dicts are defined
to have the following keys: 'revisions', a list of revision numbers (ints);
'logsummary'; and 'votes', a dict mapping ±1/±0 (int) to list of voters.
+
+ CANDIDATES is like APPROVEDS, except added to a different section of the
file.
"""
strings = []
@@ -168,6 +193,8 @@ def serialize_STATUS(approveds,
strings.append("Candidate changes:\n")
strings.append("==================\n\n")
+ strings.extend(map(serialize_entry, candidates))
+
strings.append("Random new subheading:\n")
strings.append("======================\n\n")
@@ -181,22 +208,6 @@ def serialize_STATUS(approveds,
return "".join(strings)
-def run_backport(sbox, error_expected=False, extra_env=[]):
- """Run backport.pl. EXTRA_ENV is a list of key=value pairs (str) to set in
- the child's environment. ERROR_EXPECTED is propagated to run_command()."""
- # TODO: if the test is run in verbose mode, pass DEBUG=1 in the environment,
- # and pass error_expected=True to run_command() to not croak on
- # stderr output from the child (because it uses 'sh -x').
- args = [
- '/usr/bin/env',
- 'SVN=' + svntest.main.svn_binary,
- 'YES=1', 'MAY_COMMIT=1', 'AVAILID=jrandom',
- ] + list(extra_env) + [
- 'perl', BACKPORT_PL,
- ]
- with chdir(sbox.ospath('branch')):
- return svntest.main.run_command(args[0], error_expected, False,
*(args[1:]))
-
def verify_backport(sbox, expected_dump_file, uuid):
"""Compare the contents of the SBOX repository with EXPECTED_DUMP_FILE.
Set the UUID of SBOX to UUID beforehand.
@@ -210,17 +221,17 @@ def verify_backport(sbox, expected_dump_
# mirror repository in preparation for the comparison dump.
svntest.actions.enable_revprop_changes(sbox.repo_dir)
for revnum in range(0, 1+int(sbox.youngest())):
- svntest.actions.run_and_verify_svnadmin(None, [], [],
+ svntest.actions.run_and_verify_svnadmin([], [],
"delrevprop", "-r", revnum, sbox.repo_dir, "svn:date")
# Create a dump file from the mirror repository.
dest_dump = open(expected_dump_file).readlines()
- svntest.actions.run_and_verify_svnadmin(None, None, [],
+ svntest.actions.run_and_verify_svnadmin(None, [],
'setuuid', '--', sbox.repo_dir, uuid)
src_dump = svntest.actions.run_and_verify_dump(sbox.repo_dir)
svntest.verify.compare_dump_files(
- "Dump files", "DUMP", src_dump, dest_dump)
+ "Dump files", "DUMP", dest_dump, src_dump)
######################################################################
# Tests
@@ -265,7 +276,7 @@ def backport_two_approveds(sbox):
# Now back up and do three entries.
# r9: revert r7, r8
- svntest.actions.run_and_verify_svnlook(None, ["8\n"], [],
+ svntest.actions.run_and_verify_svnlook(["8\n"], [],
'youngest', sbox.repo_dir)
sbox.simple_update()
svntest.main.run_svn(None, 'merge', '-r8:6',
@@ -294,7 +305,7 @@ def backport_accept(sbox):
# r6: conflicting change on branch
sbox.simple_append('branch/iota', 'Conflicts with first change\n')
sbox.simple_commit(message="Conflicting change on iota")
-
+
# r7: nominate r4 with --accept (because of r6)
approved_entries = [
make_entry([4], notes="Merge with --accept=theirs-conflict."),
@@ -318,7 +329,7 @@ def backport_branches(sbox):
# r6: conflicting change on branch
sbox.simple_append('branch/iota', 'Conflicts with first change')
sbox.simple_commit(message="Conflicting change on iota")
-
+
# r7: backport branch
sbox.simple_update()
sbox.simple_copy('branch', 'subversion/branches/r4')
@@ -342,6 +353,8 @@ def backport_branches(sbox):
# Run it.
run_backport(sbox)
+ # This also serves as the 'success mode' part of backport_branch_contains().
+
#----------------------------------------------------------------------
@BackportTest('76cee987-25c9-4d6c-ad40-000000000005')
@@ -367,20 +380,22 @@ def backport_conflicts_detection(sbox):
# r6: conflicting change on branch
sbox.simple_append('branch/iota', 'Conflicts with first change\n')
sbox.simple_commit(message="Conflicting change on iota")
-
+
# r7: nominate r4, but without the requisite --accept
- approved_entries = [
+ candidate_entries = [
make_entry([4], notes="This will conflict."),
]
- sbox.simple_append(STATUS, serialize_STATUS(approved_entries))
+ sbox.simple_append(STATUS, serialize_STATUS([], candidate_entries))
sbox.simple_commit(message='Nominate r4')
# Run it.
- exit_code, output, errput = run_backport(sbox, True,
- # Choose conflicts mode:
- ["MAY_COMMIT=0"])
+ exit_code, output, errput = run_conflicter(sbox, True)
- # Verify
+ # Verify the conflict is detected.
+ expected_output = svntest.verify.RegexOutput(
+ 'Index: iota',
+ match_all=False,
+ )
expected_errput = (
r'(?ms)' # re.MULTILINE | re.DOTALL
r'.*Warning summary.*'
@@ -394,11 +409,243 @@ def backport_conflicts_detection(sbox):
],
match_all=False)
svntest.verify.verify_outputs(None, output, errput,
- svntest.verify.AnyOutput, expected_errput)
+ expected_output, expected_errput)
+ svntest.verify.verify_exit_code(None, exit_code, 1)
+
+ ## Now, let's test the "Depends:" annotation silences the error.
+
+ # Re-nominate.
+ approved_entries = [
+ make_entry([4], depends="World peace."),
+ ]
+ sbox.simple_append(STATUS, serialize_STATUS(approved_entries), truncate=True)
+ sbox.simple_commit(message='Re-nominate r4')
+
+ # Detect conflicts.
+ exit_code, output, errput = run_conflicter(sbox)
+
+ # Verify stdout. (exit_code and errput were verified by run_conflicter().)
+ svntest.verify.verify_outputs(None, output, errput,
+ "Conflicts found.*, as expected.", [])
+
+
+#----------------------------------------------------------------------
+@BackportTest(None) # would be 000000000007
+def backport_branch_contains(sbox):
+ "branch must contain the revisions"
+
+ # r6: conflicting change on branch
+ sbox.simple_append('branch/iota', 'Conflicts with first change')
+ sbox.simple_commit(message="Conflicting change on iota")
+
+ # r7: backport branch
+ sbox.simple_update()
+ sbox.simple_copy('branch', 'subversion/branches/r4')
+ sbox.simple_commit(message='Create a backport branch')
+
+ # r8: merge into backport branch
+ sbox.simple_update()
+ svntest.main.run_svn(None, 'merge', '--record-only', '-c4',
+ '^/subversion/trunk',
sbox.ospath('subversion/branches/r4'))
+ sbox.simple_mkdir('subversion/branches/r4/A_resolved')
+ sbox.simple_append('subversion/branches/r4/iota', "resolved\n", truncate=1)
+ sbox.simple_commit(message='Conflict resolution via mkdir')
+
+ # r9: nominate r4,r5 with branch that contains not all of them
+ approved_entries = [
+ make_entry([4,5], branch="r4")
+ ]
+ sbox.simple_append(STATUS, serialize_STATUS(approved_entries))
+ sbox.simple_commit(message='Nominate r4')
+
+ # Run it.
+ exit_code, output, errput = run_backport(sbox, error_expected=True)
+
+ # Verify the error message.
+ expected_errput = svntest.verify.RegexOutput(
+ ".*Revisions 'r5' nominated but not included in branch",
+ match_all=False,
+ )
+ svntest.verify.verify_outputs(None, output, errput,
+ [], expected_errput)
+ svntest.verify.verify_exit_code(None, exit_code, 1)
+
+ # Verify no commit occurred.
+ svntest.actions.run_and_verify_svnlook(["9\n"], [],
+ 'youngest', sbox.repo_dir)
+
+ # Verify the working copy has been reverted.
+ svntest.actions.run_and_verify_svn([], [], 'status', '-q',
+ sbox.repo_dir)
+
+ # The sibling test backport_branches() verifies the success mode.
+
+
+
+
+#----------------------------------------------------------------------
+@BackportTest(None) # would be 000000000008
+def backport_double_conflict(sbox):
+ "two-revisioned entry with two conflicts"
+
+ # r6: conflicting change on branch
+ sbox.simple_append('branch/iota', 'Conflicts with first change')
+ sbox.simple_commit(message="Conflicting change on iota")
+
+ # r7: further conflicting change to same file
+ sbox.simple_update()
+ sbox.simple_append('subversion/trunk/iota', 'Third line\n')
+ sbox.simple_commit(message="iota's third line")
+
+ # r8: nominate
+ approved_entries = [
+ make_entry([4,7], depends="World peace.")
+ ]
+ sbox.simple_append(STATUS, serialize_STATUS(approved_entries))
+ sbox.simple_commit(message='Nominate the r4 group')
+
+ # Run it, in conflicts mode.
+ exit_code, output, errput = run_conflicter(sbox, True)
+
+ # Verify the failure mode: "merge conflict" error on stderr, but backport.pl
+ # itself exits with code 0, since conflicts were confined to Depends:-ed
+ # entries.
+ #
+ # The error only happens with multi-pass merges where the first pass
+ # conflicts and the second pass touches the conflict victim.
+ #
+ # The error would be:
+ # subversion/libsvn_client/merge.c:5499:
(apr_err=SVN_ERR_WC_FOUND_CONFLICT)
+ # svn: E155015: One or more conflicts were produced while merging r3:4
+ # into '/tmp/stw/working_copies/backport_tests-8/branch' -- resolve all
+ # conflicts and rerun the merge to apply the remaining unmerged revisions
+ # ...
+ # Warning summary
+ # ===============
+ #
+ # r4 (default logsummary): subshell exited with code 256
+ # And backport.pl would exit with exit code 1.
+
+ expected_output = 'Conflicts found.*, as expected.'
+ expected_errput = svntest.verify.RegexOutput(
+ ".*svn: E155015:.*", # SVN_ERR_WC_FOUND_CONFLICT
+ match_all=False,
+ )
+ svntest.verify.verify_outputs(None, output, errput,
+ expected_output, expected_errput)
+ svntest.verify.verify_exit_code(None, exit_code, 0)
+ if any("Warning summary" in line for line in errput):
+ raise svntest.verify.SVNUnexpectedStderr(errput)
+
+ ## Now, let's ensure this does get detected if not silenced.
+ # r9: Re-nominate
+ approved_entries = [
+ make_entry([4,7]) # no depends=
+ ]
+ sbox.simple_append(STATUS, serialize_STATUS(approved_entries), truncate=True)
+ sbox.simple_commit(message='Re-nominate the r4 group')
+
+ exit_code, output, errput = run_conflicter(sbox, True)
+
+ ## An unexpected non-zero exit code is treated as a fatal error.
+ # [1-9]\d+ matches non-zero exit codes
+ expected_stdout = None
+ expected_errput = r'r4 .*: subshell exited with code (?:[1-9]\d+)' \
+ r"|.*subprocess.CalledProcessError.*'merge'.*exit status 1"
svntest.verify.verify_exit_code(None, exit_code, 1)
+ svntest.verify.verify_outputs(None, output, errput,
+ expected_stdout, expected_errput)
+
#----------------------------------------------------------------------
+@BackportTest('76cee987-25c9-4d6c-ad40-000000000009')
+def backport_branch_with_original_revision(sbox):
+ "branch with original revision"
+
+ # r6: conflicting change on branch
+ sbox.simple_append('branch/iota', 'Conflicts with first change')
+ sbox.simple_commit(message="Conflicting change on iota")
+
+ # r7: backport branch
+ sbox.simple_update()
+ sbox.simple_copy('branch', 'subversion/branches/r4')
+ sbox.simple_commit(message='Create a backport branch')
+
+ # r8: merge into backport branch
+ sbox.simple_update()
+ svntest.main.run_svn(None, 'merge', '--record-only', '-c4',
+ '^/subversion/trunk',
sbox.ospath('subversion/branches/r4'))
+ sbox.simple_mkdir('subversion/branches/r4/A_resolved')
+ sbox.simple_append('subversion/branches/r4/iota', "resolved\n", truncate=1)
+ sbox.simple_commit(message='Conflict resolution via mkdir')
+
+ # r9: original revision on branch
+ sbox.simple_update()
+ sbox.simple_mkdir('subversion/branches/r4/dir-created-on-backport-branch')
+ sbox.simple_commit(message='An original revision on the backport branch')
+
+ # r10: nominate the branch with r9 listed
+ approved_entries = [
+ make_entry([4, 9], branch="r4")
+ ]
+ sbox.simple_append(STATUS, serialize_STATUS(approved_entries))
+ sbox.simple_commit(message='Nominate r4+r9')
+
+ # r11, r12: Run it.
+ run_backport(sbox)
+
+
+#----------------------------------------------------------------------
+@BackportTest(None)
+def backport_otherproject_change(sbox):
+ "inoperative revision"
+
+ # r6: a change outside ^/subversion
+ sbox.simple_mkdir('elsewhere')
+ sbox.simple_commit()
+
+ # r7: Nominate r6 by mistake
+ approved_entries = [
+ make_entry([6])
+ ]
+ sbox.simple_append(STATUS, serialize_STATUS(approved_entries))
+ sbox.simple_commit(message='Nominate r6 by mistake')
+
+ # Run it.
+ exit_code, output, errput = run_backport(sbox, error_expected=True)
+
+ # Verify no commit occurred.
+ svntest.actions.run_and_verify_svnlook(["7\n"], [],
+ 'youngest', sbox.repo_dir)
+
+ # Verify the failure mode.
+ expected_stdout = None
+ expected_stderr = ".*only svn:mergeinfo changes.*"
+ if exit_code == 0:
+ # Can't use verify_exit_code() since the exact code used varies.
+ raise svntest.Failure("exit_code should be non-zero")
+ svntest.verify.verify_outputs(None, output, errput,
+ expected_stdout, expected_stderr)
+
+#----------------------------------------------------------------------
+@BackportTest(None)
+def backport_STATUS_mods(sbox):
+ "local mods to STATUS"
+
+ # Introduce a local mod.
+ sbox.simple_append(STATUS, "\n")
+
+ exit_code, output, errput = run_backport(sbox, error_expected=True)
+ expected_stdout = None
+ expected_stderr = ".*Local mods.*STATUS.*"
+ if exit_code == 0:
+ # Can't use verify_exit_code() since the exact code used varies.
+ raise svntest.Failure("exit_code should be non-zero")
+ svntest.verify.verify_outputs(None, output, errput,
+ expected_stdout, expected_stderr)
+
+#----------------------------------------------------------------------
########################################################################
# Run the tests
@@ -411,6 +658,11 @@ test_list = [ None,
backport_branches,
backport_multirevisions,
backport_conflicts_detection,
+ backport_branch_contains,
+ backport_double_conflict,
+ backport_branch_with_original_revision,
+ backport_otherproject_change,
+ backport_STATUS_mods,
# When adding a new test, include the test number in the last
# 6 bytes of the UUID.
]
Propchange: subversion/branches/fsx-1.10/tools/dist/backport_tests.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/fsx-1.10/tools/dist/backport_tests.py
('svn:executable' removed)
Modified: subversion/branches/fsx-1.10/tools/dist/dist.sh
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dist/dist.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dist/dist.sh (original)
+++ subversion/branches/fsx-1.10/tools/dist/dist.sh Sun Jun 14 20:58:10 2015
@@ -22,7 +22,7 @@
# USAGE: ./dist.sh -v VERSION -r REVISION -pr REPOS-PATH
# [-alpha ALPHA_NUM|-beta BETA_NUM|-rc RC_NUM|pre PRE_NUM]
-# [-apr PATH-TO-APR ] [-apru PATH-TO-APR-UTIL]
+# [-apr PATH-TO-APR ] [-apru PATH-TO-APR-UTIL]
# [-apri PATH-TO-APR-ICONV] [-neon PATH-TO-NEON]
# [-serf PATH-TO-SERF] [-zlib PATH-TO-ZLIB]
# [-sqlite PATH-TO-SQLITE] [-zip] [-sign]
@@ -47,13 +47,13 @@
# working copy, so you may wish to create a dist-resources directory
# containing the apr/, apr-util/, neon/, serf/, zlib/ and sqlite/
# dependencies, and run dist.sh from that.
-#
+#
# When building alpha, beta or rc tarballs pass the appropriate flag
# followed by a number. For example "-alpha 5", "-beta 3", "-rc 2".
-#
+#
# If neither an -alpha, -beta, -pre or -rc option is specified, a release
# tarball will be built.
-#
+#
# To build a Windows zip file package, additionally pass -zip and the
# path to apr-iconv with -apri.
@@ -119,7 +119,7 @@ if [ -n "$ALPHA" ] && [ -n "$BETA" ] &&
exit 1
elif [ -n "$ALPHA" ] ; then
VER_TAG="Alpha $ALPHA"
- VER_NUMTAG="-alpha$ALPHA"
+ VER_NUMTAG="-alpha$ALPHA"
elif [ -n "$BETA" ] ; then
VER_TAG="Beta $BETA"
VER_NUMTAG="-beta$BETA"
Modified: subversion/branches/fsx-1.10/tools/dist/nightly.sh
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dist/nightly.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dist/nightly.sh (original)
+++ subversion/branches/fsx-1.10/tools/dist/nightly.sh Sun Jun 14 20:58:10 2015
@@ -54,7 +54,7 @@ head=`$svn info $repo/trunk | grep '^Rev
# Get the latest versions of the rolling scripts
for i in release.py dist.sh
-do
+do
$svn export --force -r $head $repo/trunk/tools/dist/$i@$head $dir/$i
done
# We also need ezt
Modified: subversion/branches/fsx-1.10/tools/dist/release.py
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dist/release.py?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dist/release.py (original)
+++ subversion/branches/fsx-1.10/tools/dist/release.py Sun Jun 14 20:58:10 2015
@@ -87,12 +87,12 @@ tool_versions = {
'trunk' : {
'autoconf' : '2.69',
'libtool' : '2.4.3',
- 'swig' : '3.0.0',
+ 'swig' : '2.0.12',
},
'1.9' : {
'autoconf' : '2.69',
'libtool' : '2.4.3',
- 'swig' : '3.0.0'
+ 'swig' : '2.0.12'
},
'1.8' : {
'autoconf' : '2.69',
@@ -421,6 +421,29 @@ def compare_changes(repos, branch, revis
logging.warning('CHANGES has unmerged revisions: %s' %
stdout.replace("\n", " "))
+
+_current_year = str(datetime.datetime.now().year)
+_copyright_re = re.compile(r'Copyright (?:\(C\) )?(?P<year>[0-9]+)'
+ r' The Apache Software Foundation',
+ re.MULTILINE)
+
+def check_copyright_year(repos, branch, revision):
+ def check_file(branch_relpath):
+ file_url = (repos + '/' + branch + '/'
+ + branch_relpath + '@' + str(revision))
+ cat_cmd = ['svn', 'cat', file_url]
+ stdout = subprocess.check_output(cat_cmd)
+ m = _copyright_re.search(stdout)
+ if m:
+ year = m.group('year')
+ else:
+ year = None
+ if year != _current_year:
+ logging.warning('Copyright year in ' + branch_relpath
+ + ' is not the current year')
+ check_file('NOTICE')
+ check_file('subversion/libsvn_subr/version.c')
+
def roll_tarballs(args):
'Create the release artifacts.'
@@ -432,6 +455,8 @@ def roll_tarballs(args):
logging.info('Rolling release %s from branch %s@%d' % (args.version,
branch,
args.revnum))
+ check_copyright_year(repos, args.branch, args.revnum)
+
# Ensure we've got the appropriate rolling dependencies available
autoconf = AutoconfDep(args.base_dir, False, args.verbose,
tool_versions[args.version.branch]['autoconf'])
Propchange: subversion/branches/fsx-1.10/tools/hook-scripts/control-chars.py
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/fsx-1.10/tools/hook-scripts/mailer/mailer.py
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/hook-scripts/mailer/mailer.py?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/hook-scripts/mailer/mailer.py (original)
+++ subversion/branches/fsx-1.10/tools/hook-scripts/mailer/mailer.py Sun Jun 14
20:58:10 2015
@@ -241,7 +241,7 @@ class MailedOutput(OutputBase):
# characters), encoding (per RFC2047) each token as necessary, and
# slapping 'em back to together again.
from email.Header import Header
-
+
def _maybe_encode_header(hdr_token):
try:
hdr_token.encode('ascii')
Modified:
subversion/branches/fsx-1.10/tools/hook-scripts/mailer/tests/mailer-init.sh
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/hook-scripts/mailer/tests/mailer-init.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/hook-scripts/mailer/tests/mailer-init.sh
(original)
+++ subversion/branches/fsx-1.10/tools/hook-scripts/mailer/tests/mailer-init.sh
Sun Jun 14 20:58:10 2015
@@ -104,12 +104,12 @@ svn commit -m "copy dir, then make a cha
printf "\x00\x01\x02\x03\x04\n" > file11
svn add file11
svn ps svn:mime-type application/octect-stream file11
-svn ps prop2 -F file11 file9
+svn ps prop2 -F file11 file9
svn commit -m "add binary file"
# change the binary file and set property to non binary value
printf "\x20\x01\x02\x20\n" > file11
-svn ps prop2 propval2 file9
+svn ps prop2 propval2 file9
svn commit -m "change binary file"
# tweak the commit dates to known quantities
Propchange: subversion/branches/fsx-1.10/tools/hook-scripts/validate-files.py
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/fsx-1.10/tools/po/po-update.sh
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/po/po-update.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/po/po-update.sh (original)
+++ subversion/branches/fsx-1.10/tools/po/po-update.sh Sun Jun 14 20:58:10 2015
@@ -93,8 +93,8 @@ update_po()
# GNU gettext-tools 0.14.6 implementation) inverts the order of obsolete
# messages every time it is run. Therefore, run it twice, to invert and
# then re-invert, to minimize spurious diffs.
- $MSGMERGE --sort-by-file --no-wrap --update $i subversion.pot
- $MSGMERGE --sort-by-file --no-wrap --update $i subversion.pot
+ $MSGMERGE --sort-by-file --no-wrap --update $i subversion.pot
+ $MSGMERGE --sort-by-file --no-wrap --update $i subversion.pot
done )
}
Modified: subversion/branches/fsx-1.10/tools/server-side/svnpubsub/daemonize.py
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/server-side/svnpubsub/daemonize.py?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/server-side/svnpubsub/daemonize.py
(original)
+++ subversion/branches/fsx-1.10/tools/server-side/svnpubsub/daemonize.py Sun
Jun 14 20:58:10 2015
@@ -83,7 +83,7 @@ class Daemon(object):
p = multiprocessing.Process(target=self._first_child,
args=(child_is_ready, child_completed))
p.start()
-
+
# Wait for the child to finish setting things up (in case we need
# to communicate with it). It will only exit when ready.
### use a timeout here! (parameterized, of course)
@@ -260,13 +260,13 @@ class _Detacher(Daemon):
def run(self):
self.target(*self.args, **self.kwargs)
-
+
def run_detached(target, *args, **kwargs):
"""Simple function to run TARGET as a detached daemon.
-
+
The additional arguments/keywords will be passed along. This function
does not return -- sys.exit() will be called as appropriate.
-
+
(capture SystemExit if logging/reporting is necessary)
### if needed, a variant of this func could be written to not exit
"""
Propchange:
subversion/branches/fsx-1.10/tools/server-side/svnpubsub/svnpubsub/util.py
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/fsx-1.10/win-tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/win-tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/win-tests.py (original)
+++ subversion/branches/fsx-1.10/win-tests.py Sun Jun 14 20:58:10 2015
@@ -83,6 +83,13 @@ def _usage_exit():
print(" --disable-http-v2 : Do not advertise support for HTTPv2 on
server")
print(" --disable-bulk-updates : Disable bulk updates on HTTP server")
print(" --ssl-cert : Path to SSL server certificate to trust.")
+ print(" --exclusive-wc-locks : Enable exclusive working copy locks")
+ print(" --memcached-dir=DIR : Run memcached from dir")
+ print(" --memcached-server= : Enable usage of the specified memcached
server")
+ print(" <url:port>")
+ print(" --skip-c-tests : Skip all C tests")
+ print(" --dump-load-cross-check: Run the dump load cross check after every
test")
+
print(" --javahl : Run the javahl tests instead of the normal
tests")
print(" --swig=language : Run the swig perl/python/ruby tests
instead of")
print(" the normal tests")
@@ -127,7 +134,9 @@ opts, args = my_getopt(sys.argv[1:], 'hr
'list', 'enable-sasl', 'bin=', 'parallel',
'config-file=', 'server-minor-version=', 'log-level=',
'log-to-stdout', 'mode-filter=', 'milestone-filter=',
- 'ssl-cert='])
+ 'ssl-cert=', 'exclusive-wc-locks', 'memcached-server=',
+ 'skip-c-tests', 'dump-load-cross-check',
'memcached-dir=',
+ ])
if len(args) > 1:
print('Warning: non-option arguments after the first one will be ignored')
@@ -162,6 +171,12 @@ mode_filter=None
tests_to_run = []
log_level = None
ssl_cert = None
+exclusive_wc_locks = None
+run_memcached = None
+memcached_server = None
+memcached_dir = None
+skip_c_tests = None
+dump_load_cross_check = None
for opt, val in opts:
if opt in ('-h', '--help'):
@@ -212,7 +227,7 @@ for opt, val in opts:
test_javahl = 1
elif opt == '--swig':
if val not in ['perl', 'python', 'ruby']:
- sys.stderr.write('Running \'%s\' swig tests not supported (yet).\n'
+ sys.stderr.write('Running \'%s\' swig tests not supported (yet).\n'
% (val,))
test_swig = val
elif opt == '--list':
@@ -238,6 +253,17 @@ for opt, val in opts:
log_level = val
elif opt == '--ssl-cert':
ssl_cert = val
+ elif opt == '--exclusive-wc-locks':
+ exclusive_wc_locks = 1
+ elif opt == '--memcached-server':
+ memcached_server = val
+ elif opt == '--skip-c-tests':
+ skip_c_tests = 1
+ elif opt == '--dump-load-cross-check':
+ dump_load_cross_check = 1
+ elif opt == '--memcached-dir':
+ memcached_dir = val
+ run_memcached = 1
# Calculate the source and test directory names
abs_srcdir = os.path.abspath("")
@@ -257,7 +283,7 @@ if fs_type == 'bdb':
all_tests = gen_obj.test_progs + gen_obj.bdb_test_progs \
+ gen_obj.scripts + gen_obj.bdb_scripts
else:
- all_tests = gen_obj.test_progs + gen_obj.scripts
+ all_tests = gen_obj.test_progs + gen_obj.scripts
client_tests = [x for x in all_tests if x.startswith(CMDLINE_TEST_SCRIPT_PATH)]
@@ -323,14 +349,14 @@ def locate_libs():
"Move DLLs to a known location and set env vars"
debug = (objdir == 'Debug')
-
+
for lib in gen_obj._libraries.values():
if debug:
name, dir = lib.debug_dll_name, lib.debug_dll_dir
else:
name, dir = lib.dll_name, lib.dll_dir
-
+
if name and dir:
src = os.path.join(dir, name)
if os.path.exists(src):
@@ -569,6 +595,8 @@ class Httpd:
'jrandom', 'rayjandom'])
os.spawnv(os.P_WAIT, htpasswd, ['htpasswd.exe', '-bp', self.httpd_users,
'jconstant', 'rayjandom'])
+ os.spawnv(os.P_WAIT, htpasswd, ['htpasswd.exe', '-bp', self.httpd_users,
+ '__dumpster__', '__loadster__'])
def _create_mime_types_file(self):
"Create empty mime.types file"
@@ -635,6 +663,10 @@ class Httpd:
else:
self._start_daemon()
+ # Avoid output from starting and preparing between test results
+ sys.stderr.flush()
+ sys.stdout.flush()
+
def stop(self):
if self.service:
self._stop_service()
@@ -672,6 +704,45 @@ class Httpd:
pass
print('Httpd.stop_daemon not implemented')
+class Memcached:
+ "Run memcached for tests"
+ def __init__(self, abs_memcached_dir, memcached_server):
+ self.name = 'memcached.exe'
+
+ self.memcached_host, self.memcached_port = memcached_server.split(':')
+ self.memcached_dir = abs_memcached_dir
+
+ self.proc = None
+ self.path = os.path.join(self.memcached_dir, self.name)
+
+ self.memcached_args = [
+ self.name,
+ '-p', self.memcached_port,
+ '-l', self.memcached_host
+ ]
+
+ def __del__(self):
+ "Stop memcached when the object is deleted"
+ self.stop()
+
+ def start(self):
+ "Start memcached as daemon"
+ print('Starting %s as daemon' % self.name)
+ print(self.memcached_args)
+ self.proc = subprocess.Popen([self.path] + self.memcached_args)
+
+ def stop(self):
+ "Stop memcached"
+ if self.proc is not None:
+ try:
+ print('Stopping %s' % self.name)
+ self.proc.poll();
+ if self.proc.returncode is None:
+ self.proc.kill();
+ return
+ except AttributeError:
+ pass
+
# Move the binaries to the test directory
create_target_dir(abs_builddir)
locate_libs()
@@ -692,10 +763,15 @@ create_target_dir(CMDLINE_TEST_SCRIPT_NA
abs_builddir = fix_case(abs_builddir)
daemon = None
+memcached = None
# Run the tests
# No need to start any servers if we are only listing the tests.
if not list_tests:
+ if run_memcached:
+ memcached = Memcached(memcached_dir, memcached_server)
+ memcached.start()
+
if run_svnserve:
daemon = Svnserve(svnserve_args, objdir, abs_objdir, abs_builddir)
@@ -759,7 +835,11 @@ if not test_javahl and not test_swig:
fsfs_sharding, fsfs_packing,
list_tests, svn_bin, mode_filter,
milestone_filter,
- set_log_level=log_level, ssl_cert=ssl_cert)
+ set_log_level=log_level, ssl_cert=ssl_cert,
+ exclusive_wc_locks=exclusive_wc_locks,
+ memcached_server=memcached_server,
+ skip_c_tests=skip_c_tests,
+ dump_load_cross_check=dump_load_cross_check)
old_cwd = os.getcwd()
try:
os.chdir(abs_builddir)
@@ -792,6 +872,9 @@ elif test_javahl:
if (objdir == 'Debug'):
args = args + ('-Xcheck:jni',)
+ if cleanup:
+ args = args + ('-Dtest.cleanup=1',)
+
args = args + (
'-Dtest.rootdir=' + os.path.join(abs_builddir, 'javahl'),
'-Dtest.srcdir=' + os.path.join(abs_srcdir,
@@ -799,7 +882,7 @@ elif test_javahl:
'-Dtest.rooturl=',
'-Dtest.fstype=' + fs_type ,
'-Dtest.tests=',
-
+
'-Djava.library.path='
+ os.path.join(abs_objdir,
'subversion/bindings/javahl/native'),
@@ -976,6 +1059,9 @@ elif test_swig == 'ruby':
if daemon:
del daemon
+if memcached:
+ del memcached
+
# Remove the execs again
for tgt in copied_execs:
try: