Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/checkout_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/checkout_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/checkout_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/checkout_tests.py Sun Jun 14 20:58:10 2015 @@ -206,8 +206,8 @@ def checkout_with_obstructions(sbox): 'A/B/lambda', 'A/D', 'A/D/G', 'A/D/G/rho', 'A/D/G/pi', 'A/D/G/tau', 'A/D/H', 'A/D/H/psi', 'A/D/H/omega', 'A/D/H/chi', 'A/D/gamma', 'A/C') - actions.run_and_verify_checkout2(False, url, wc_dir, expected_output, - expected_disk, None, None, None, None) + actions.run_and_verify_checkout(url, wc_dir, expected_output, + expected_disk) # svn status expected_status = actions.get_virginal_state(wc_dir, 1) @@ -243,7 +243,7 @@ def checkout_with_obstructions(sbox): expected_status = actions.get_virginal_state(wc_dir, 1) actions.run_and_verify_update(wc_dir, expected_output, expected_disk, - expected_status, None, None, None, None, None, False, wc_dir) + expected_status,) @@ -291,7 +291,7 @@ def forced_checkout_of_file_with_dir_obs expected_disk.tweak('iota', contents=None) actions.run_and_verify_checkout(url, wc_dir_other, expected_output, - expected_disk, None, None, None, None, '--force') + expected_disk, [], '--force') #---------------------------------------------------------------------- @@ -356,7 +356,7 @@ def forced_checkout_of_dir_with_file_obs expected_disk.tweak('A', contents='The file A\n') actions.run_and_verify_checkout(url, wc_dir_other, expected_output, - expected_disk, None, None, None, None, '--force') + expected_disk, [], '--force') # Now see to it that we can recover from the obstructions. @@ -374,7 +374,7 @@ def forced_checkout_of_dir_with_file_obs svntest.main.run_svn(None, 'revert', '-R', os.path.join(wc_dir_other, 'A')) actions.run_and_verify_update(wc_dir_other, expected_output, expected_disk, - expected_status, None, None, None, None, None, False, wc_dir_other) + expected_status) #---------------------------------------------------------------------- @@ -390,8 +390,7 @@ def forced_checkout_with_faux_obstructio svntest.actions.run_and_verify_checkout(sbox.repo_url, sbox.wc_dir, expected_output, - expected_wc, None, None, None, - None, '--force') + expected_wc, [], '--force') #---------------------------------------------------------------------- @@ -411,8 +410,7 @@ def forced_checkout_with_real_obstructio svntest.actions.run_and_verify_checkout(sbox.repo_url, sbox.wc_dir, expected_output, - expected_wc, None, None, None, - None, '--force') + expected_wc, [], '--force') #---------------------------------------------------------------------- @@ -436,8 +434,7 @@ def forced_checkout_with_real_obstructio svntest.actions.run_and_verify_checkout(sbox.repo_url, sbox.wc_dir, expected_output, - expected_wc, None, None, None, - None, '--force') + expected_wc, [], '--force') #---------------------------------------------------------------------- @@ -481,8 +478,7 @@ def forced_checkout_with_versioned_obstr expected_wc = svntest.main.greek_state.copy() svntest.actions.run_and_verify_checkout(repo_url, fresh_wc_dir, expected_output, expected_wc, - None, None, None, None, - '--force') + [], '--force') # Checkout the entire first repos into the other dir. This should # fail because it's a different repository. @@ -493,8 +489,7 @@ def forced_checkout_with_versioned_obstr expected_wc = svntest.main.greek_state.copy() svntest.actions.run_and_verify_checkout(repo_url, other_wc_dir, expected_output, expected_wc, - None, None, None, None, - '--force') + [], '--force') #ensure that other_wc_dir_A is not affected by this forced checkout. svntest.actions.run_and_verify_svn(None, @@ -573,8 +568,7 @@ def import_and_checkout(sbox): svntest.actions.run_and_verify_checkout(other_repo_url, import_from_dir, expected_output, expected_wc, - None, None, None, None, - '--force') + [], '--force') #---------------------------------------------------------------------- # Issue #2529. @@ -584,7 +578,8 @@ def checkout_broken_eol(sbox): svntest.actions.load_repo(sbox, os.path.join(os.path.dirname(sys.argv[0]), 'update_tests_data', - 'checkout_broken_eol.dump')) + 'checkout_broken_eol.dump'), + create_wc=False) URL = sbox.repo_url @@ -662,7 +657,7 @@ def checkout_peg_rev_date(sbox): ## Get svn:date. exit_code, output, errput = svntest.main.run_svn(None, 'propget', 'svn:date', '--revprop', '-r1', - '--strict', + '--no-newline', sbox.repo_url) if exit_code or errput != [] or len(output) != 1: raise svntest.Failure("svn:date propget failed") @@ -707,7 +702,7 @@ def checkout_peg_rev_date(sbox): expected_output, expected_wc) - # now try another checkout with repo@r1_string + # now try another checkout with repo@r1_string checkout_target = sbox.add_wc_path('checkout2') os.mkdir(checkout_target) @@ -807,7 +802,7 @@ def co_with_obstructing_local_adds(sbox) # Commit. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Create various paths scheduled for addition which will obstruct # the adds coming from the repos. @@ -895,9 +890,8 @@ def co_with_obstructing_local_adds(sbox) # wc_backup before performing the checkout otherwise. svntest.actions.run_and_verify_checkout(sbox.repo_url, wc_backup, expected_output, expected_disk, - svntest.tree.detect_conflict_files, - extra_files, None, None, - '--force') + [], '--force', + extra_files=extra_files) svntest.actions.run_and_verify_status(wc_backup, expected_status) @@ -1001,8 +995,7 @@ def co_with_obstructing_local_adds(sbox) D_path, expected_output, expected_disk, - None, None, None, None, - '--force') + [], '--force') expected_status.tweak('A/D/M', treeconflict='C', status='R ') expected_status.tweak( @@ -1041,8 +1034,7 @@ def co_with_obstructing_local_adds(sbox) F_path, expected_output, expected_disk, - None, None, None, None, - '--force') + [], '--force') expected_status.tweak('A/B/F/omicron', treeconflict='C', status='R ') expected_status.add({ @@ -1052,6 +1044,7 @@ def co_with_obstructing_local_adds(sbox) #---------------------------------------------------------------------- # Test if checking out from a Windows driveroot is supported. +@SkipUnless(svntest.main.is_os_windows) def checkout_wc_from_drive(sbox): "checkout from the root of a Windows drive" @@ -1078,10 +1071,6 @@ def checkout_wc_from_drive(sbox): return None - # Skip the test if not on Windows - if not svntest.main.windows: - raise svntest.Skip - # just create an empty folder, we'll checkout later. sbox.build(create_wc = False) svntest.main.safe_rmtree(sbox.wc_dir) @@ -1090,7 +1079,7 @@ def checkout_wc_from_drive(sbox): # create a virtual drive to the repository folder drive = find_the_next_available_drive_letter() if drive is None: - raise svntest.Skip + raise svntest.Skip('No drive letter available') subprocess.call(['subst', drive +':', sbox.repo_dir]) repo_url = 'file:///' + drive + ':/' @@ -1122,8 +1111,7 @@ def checkout_wc_from_drive(sbox): 'iota' : Item(status='A '), }) svntest.actions.run_and_verify_checkout(repo_url, wc_dir, - expected_output, expected_wc, - None, None, None, None) + expected_output, expected_wc) wc2_dir = sbox.add_wc_path('2') expected_output = wc.State(wc2_dir, { @@ -1160,12 +1148,11 @@ def checkout_wc_from_drive(sbox): 'D/G/tau' : Item(contents="This is the file 'tau'.\n"), 'D/G/pi' : Item(contents="This is the file 'pi'.\n"), 'D/gamma' : Item(contents="This is the file 'gamma'.\n"), - 'mu' : Item(contents="This is the file 'mu'.\n"), + 'mu' : Item(contents="This is the file 'mu'.\n"), }) - + svntest.actions.run_and_verify_checkout(repo_url + '/A', wc2_dir, - expected_output, expected_wc, - None, None, None, None) + expected_output, expected_wc) wc3_dir = sbox.add_wc_path('3') expected_output = wc.State(wc3_dir, { @@ -1187,12 +1174,11 @@ def checkout_wc_from_drive(sbox): 'G/pi' : Item(contents="This is the file 'pi'.\n"), 'G/tau' : Item(contents="This is the file 'tau'.\n"), 'G/rho' : Item(contents="This is the file 'rho'.\n"), - 'gamma' : Item(contents="This is the file 'gamma'.\n"), + 'gamma' : Item(contents="This is the file 'gamma'.\n"), }) svntest.actions.run_and_verify_checkout(repo_url + '/A/D', wc3_dir, - expected_output, expected_wc, - None, None, None, None) + expected_output, expected_wc) finally: os.chdir(was_cwd)
Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/commit_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/commit_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/commit_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/commit_tests.py Sun Jun 14 20:58:10 2015 @@ -174,7 +174,7 @@ def commit_one_file(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], omega_path) @@ -200,7 +200,7 @@ def commit_one_new_file(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], gloo_path) @@ -229,7 +229,7 @@ def commit_one_new_binary_file(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], gloo_path) @@ -283,7 +283,7 @@ def commit_multiple_targets(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], psi_path, AB_path, pi_path) #---------------------------------------------------------------------- @@ -339,7 +339,7 @@ def commit_multiple_targets_2(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], psi_path, AB_path, omega_path, pi_path) @@ -375,7 +375,7 @@ def commit_inclusive_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], D_path) #---------------------------------------------------------------------- @@ -417,7 +417,7 @@ def commit_top_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], wc_dir) #---------------------------------------------------------------------- @@ -449,7 +449,7 @@ def commit_unversioned_thing(sbox): svntest.actions.run_and_verify_commit(wc_dir, None, None, - "is not under version control", + ".*is not under version control.*", os.path.join(wc_dir,'blorg')) #---------------------------------------------------------------------- @@ -527,9 +527,7 @@ def nested_dir_replacements(sbox): # Commit from the top of the working copy and verify output & status. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -560,8 +558,7 @@ def hudson_part_1(sbox): # Commit the deletion of gamma and verify. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Now gamma should be marked as `deleted' under the hood. When we # update, we should no output, and a perfect, virginal status list @@ -611,8 +608,7 @@ def hudson_part_1_variation_1(sbox): # Commit the deletion of H and verify. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Now H should be marked as `deleted' under the hood. When we # update, we should no see output, and a perfect, virginal status @@ -662,8 +658,7 @@ def hudson_part_1_variation_2(sbox): # Commit the deletion of gamma and verify. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Now gamma should be marked as `deleted' under the hood. # Go ahead and re-add gamma, so that is *also* scheduled for addition. @@ -688,8 +683,7 @@ def hudson_part_1_variation_2(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -722,8 +716,7 @@ def hudson_part_2(sbox): # Commit the deletion of gamma and verify. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Now gamma should be marked as `deleted' under the hood, at # revision 2. Meanwhile, A/D is still lagging at revision 1. @@ -735,8 +728,7 @@ def hudson_part_2(sbox): svntest.actions.run_and_verify_commit(wc_dir, None, None, - "[Oo]ut.of.date", - wc_dir) + ".*[Oo]ut of date.*") #---------------------------------------------------------------------- @@ -787,8 +779,7 @@ def hudson_part_2_1(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Now, assuming all three files in H are marked as 'deleted', an # update of H should print absolutely nothing. @@ -905,8 +896,7 @@ def merge_mixed_revisions(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # 2. svn up A/D/H @@ -940,8 +930,7 @@ def merge_mixed_revisions(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # 4. echo "moo" >> A/D/H/chi; svn ci A/D/H/chi @@ -955,8 +944,7 @@ def merge_mixed_revisions(sbox): expected_status.tweak('iota', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # 5. echo "moo" >> iota; svn ci iota svntest.main.file_append(iota_path, "moomoo") @@ -969,8 +957,7 @@ def merge_mixed_revisions(sbox): expected_status.tweak('iota', wc_rev=5) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # At this point, here is what our tree should look like: # _ 1 ( 5) working_copies/commit_tests-10 @@ -1011,8 +998,7 @@ def merge_mixed_revisions(sbox): expected_status.tweak('A/D/H/chi', wc_rev=4) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -1089,8 +1075,7 @@ def commit_uri_unsafe(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -1126,8 +1111,7 @@ def commit_deleted_edited(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -1234,9 +1218,7 @@ def commit_add_file_twice(sbox): # Commit should succeed svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Update to state before commit svntest.main.run_svn(None, 'up', '-r', '1', wc_dir) @@ -1249,8 +1231,7 @@ def commit_add_file_twice(sbox): svntest.actions.run_and_verify_commit(wc_dir, None, None, - "E160020: File.*already exists", - wc_dir) + ".*E160020: File.*already exists.*") #---------------------------------------------------------------------- @@ -1286,9 +1267,7 @@ def commit_from_long_dir(sbox): svntest.actions.run_and_verify_commit(abs_wc_dir, expected_output, - None, - None, - abs_wc_dir) + None) #---------------------------------------------------------------------- @@ -1309,8 +1288,7 @@ def commit_with_lock(sbox): None, None, 'svn: E155004: ' - 'Working copy \'.*\' locked', - wc_dir) + 'Working copy \'.*\' locked') # unlock directory svntest.actions.run_and_verify_svn([], [], @@ -1324,9 +1302,7 @@ def commit_with_lock(sbox): expected_status.tweak('A/D/gamma', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -1350,9 +1326,7 @@ def commit_current_dir(sbox): }) svntest.actions.run_and_verify_commit('.', expected_output, - None, - None, - '.') + None) os.chdir(was_cwd) # I can't get the status check to work as part of run_and_verify_commit. @@ -1622,7 +1596,7 @@ def commit_nonrecursive(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], '-N', sbox.ospath(file1_path), sbox.ospath(dir1_path), @@ -1749,7 +1723,7 @@ def commit_nonrecursive(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], '-N', sbox.ospath(dirA_path)) #---------------------------------------------------------------------- @@ -1819,7 +1793,7 @@ def commit_out_of_date_deletions(sbox): status=' ') expected_status.remove('A/B/F', 'A/D/H/chi', 'A/B/E/beta', 'A/D/H/psi') commit = svntest.actions.run_and_verify_commit - commit(wc_dir, expected_output, expected_status, None, wc_dir) + commit(wc_dir, expected_output, expected_status, [], wc_dir) # Edits in wc backup I_path = os.path.join(wc_backup, 'A', 'I') @@ -1840,7 +1814,7 @@ def commit_out_of_date_deletions(sbox): # A commit of any one of these files or dirs should fail, preferably # with an out-of-date error message. - error_re = "(out of date|not found)" + error_re = ".*(out of date|not found).*" commit(wc_backup, None, None, error_re, C_path) commit(wc_backup, None, None, error_re, I_path) commit(wc_backup, None, None, error_re, F_path) @@ -1868,7 +1842,7 @@ def commit_with_bad_log_message(sbox): # Commit and expect an error. svntest.actions.run_and_verify_commit(wc_dir, None, None, - "contains a zero byte", + ".*contains a zero byte.*", '-F', log_msg_path, iota_path) @@ -1890,9 +1864,10 @@ def commit_with_mixed_line_endings(sbox) svntest.main.file_append(log_msg_path, "test\nthis\n\rcase\r\n--This line, and those below, will be ignored--\n") # Commit and expect an error. + expected_stderr = ".*E135000: Error normalizing log message to internal format.*" svntest.actions.run_and_verify_commit(wc_dir, None, None, - "Error normalizing log message to internal format", + expected_stderr, '-F', log_msg_path, iota_path) @@ -1923,7 +1898,7 @@ def commit_with_mixed_line_endings_in_ig svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], iota_path) def from_wc_top_with_bad_editor(sbox): @@ -1991,8 +1966,7 @@ def mods_in_schedule_delete(sbox): 'A/C' : Item(verb='Deleting'), }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) # Unversioned file still exists actual_contents = open(foo_path).read() @@ -2165,7 +2139,7 @@ def commit_same_folder_in_targets(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], '-N', wc_dir, iota_path) @@ -2261,7 +2235,7 @@ def commit_with_revprop(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], '-m', 'msg', '--with-revprop', 'bug=62', omega_path, gloo_path) @@ -2637,7 +2611,7 @@ def changelist_near_conflict(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], "--changelist=" + changelist_name, "-m", "msg", wc_dir) @@ -2665,9 +2639,7 @@ def commit_out_of_date_file(sbox): expected_status.tweak("A/D/G/pi", wc_rev=2, status=" ") svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - "-m", "log message", wc_dir) + expected_status) svntest.main.file_append(backup_pi_path, "hello") expected_err = ".*(pi.*out of date|Out of date.*pi).*" @@ -2757,7 +2729,7 @@ def tree_conflicts_block_commit(sbox): D = sbox.ospath('A/D') G = sbox.ospath('A/D/G') - error_re = "remains in conflict" + error_re = ".*remains in conflict.*" commit_fails_at_path(wc_dir, wc_dir, error_re) commit_fails_at_path(A, A, error_re) commit_fails_at_path(D, D, error_re) @@ -2831,9 +2803,7 @@ def commit_incomplete(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- # Reported here: @@ -2883,8 +2853,7 @@ def commit_danglers(sbox): svntest.actions.run_and_verify_commit(mu_copied, None, None, - expected_error, - mu_copied) + expected_error) # But now do the same thing via changelist filtering svntest.main.run_svn(None, 'changelist', 'L', mu_copied, sbox.ospath('A/mu')) @@ -2931,17 +2900,17 @@ def last_changed_of_copied_subdir(sbox): def commit_unversioned(sbox): "verify behavior on unversioned targets" - + sbox.build(read_only=True) wc_dir = sbox.wc_dir - - expected_err = 'E200009: .*existing.*\' is not under version control' + + expected_err = '.*E200009: .*existing.*\' is not under version control.*' # Unversioned, but existing file - svntest.main.file_write(sbox.ospath('existing'), "xxxx") + svntest.main.file_write(sbox.ospath('existing'), "xxxx") svntest.actions.run_and_verify_commit(wc_dir, None, None, expected_err, sbox.ospath('existing')) - + # Unversioned, not existing svntest.actions.run_and_verify_commit(wc_dir, None, None, expected_err, sbox.ospath('not-existing')) @@ -2994,9 +2963,7 @@ def commit_cp_with_deep_delete(sbox): # Commit the copy without the one dir. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) def commit_deep_deleted(sbox): "try to commit a deep descendant of a deleted node" @@ -3008,9 +2975,9 @@ def commit_deep_deleted(sbox): sbox.simple_propset('k', 'v', 'AA/D/G') # Committing some added descendant returns a proper error - expected_err = ('svn: E200009: \'%s\' is not known to exist in the ' + + expected_err = ('.*svn: E200009: \'%s\' is not known to exist in the ' + 'repository and is not part of the commit, yet its ' + - 'child \'%s\' is part of the commit') % ( + 'child \'%s\' is part of the commit.*') % ( re.escape(os.path.abspath(sbox.ospath('AA'))), re.escape(os.path.abspath(sbox.ospath('AA/D/G')))) @@ -3120,6 +3087,32 @@ def mkdir_conflict_proper_error(sbox): 'mkdir', repo_url + '/A', '-m', '') +def commit_xml(sbox): + "commit an xml file" + + sbox.build() + + sbox.simple_add_text('index.xml', 'index.xml') + sbox.simple_add_text('index.html', 'index.html') + sbox.simple_propset('svn:mime-type', 'text/xml', 'index.xml') + sbox.simple_propset('svn:mime-type', 'text/html', 'index.html') + + # This currently (2015-04-09) makes mod_dav return a 'HTTP/1.1 201 Created' + # result with content type text/xml (copied from file), which used to + # invoke the error parsing. + # + # Depending on the Apache version and config, this may cause an xml error. + sbox.simple_commit() + + # This currently (2015-04-09) makes mod_dav return a 'HTTP/1.1 204 Updated' + # result with content type text/xml (copied from file), which used to + # invoke the error parsing. + # + # Depending on the Apache version and config, this may cause an xml error. + sbox.simple_append('index.xml', '<Q></R>', True) + sbox.simple_append('index.html', '<Q></R>', True) + sbox.simple_commit() + ######################################################################## # Run the tests @@ -3196,6 +3189,7 @@ test_list = [ None, commit_deep_deleted, commit_mergeinfo_ood, mkdir_conflict_proper_error, + commit_xml, ] if __name__ == '__main__': Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/copy_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/copy_tests.py Sun Jun 14 20:58:10 2015 @@ -91,8 +91,7 @@ or a url (when false) copy source is use }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Helper for wc_copy_replace_with_props and # repos_to_wc_copy_replace_with_props @@ -139,8 +138,7 @@ def copy_replace_with_props(sbox, wc_cop expected_status.tweak('A/D/G/rho', wc_rev='2') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Bring wc into sync svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) @@ -184,8 +182,7 @@ def copy_replace_with_props(sbox, wc_cop }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) ###################################################################### @@ -324,9 +321,7 @@ def basic_copy_and_move_files(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Issue 1091, alpha2 would now have the wrong checksum and so a # subsequent commit would fail @@ -337,9 +332,7 @@ def basic_copy_and_move_files(sbox): expected_status.tweak('A/C/alpha2', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Assure that attempts at local copy and move fail when a log # message is provided. @@ -391,9 +384,7 @@ def receive_copy_in_update(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Now update the other working copy; it should receive a full add of # the newG directory and its contents. @@ -465,9 +456,7 @@ def resurrect_deleted_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Use 'svn cp URL@1 URL' to resurrect the deleted directory, where # the two URLs are identical. This used to trigger a failure. @@ -512,9 +501,7 @@ def copy_deleted_dir_into_prefix(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, - None, - wc_dir) + None) # Ok, copy from a deleted URL into a prefix of that URL, this used to # result in an assert failing. @@ -558,7 +545,7 @@ def no_copy_overwrites(sbox): # Repeat the last command. It should *fail* because A/D/H/G already exists. svntest.actions.run_and_verify_svn( - None, ".*'/A/D/H/G'.*", + None, ".*E160020: Path.*/A/D/H/G' already exists.*", 'cp', dirURL1, dirURL2, '-m', 'fooogle') @@ -618,9 +605,7 @@ def copy_modify_commit(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, - None, - wc_dir) + None) #---------------------------------------------------------------------- @@ -645,8 +630,7 @@ def copy_files_with_properties(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/D/G/rho', status=' ', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) # Set another property, but don't commit it yet svntest.actions.run_and_verify_svn(None, [], @@ -692,8 +676,7 @@ def copy_files_with_properties(sbox): 'A/D/G/rho_url' : Item(status=' ', wc_rev=3), }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) #---------------------------------------------------------------------- @@ -725,9 +708,7 @@ def copy_delete_commit(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, - None, - wc_dir) + None) # copy a tree svntest.actions.run_and_verify_svn(None, [], 'cp', @@ -745,9 +726,7 @@ def copy_delete_commit(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, - None, - wc_dir) + None) #---------------------------------------------------------------------- @@ -1005,8 +984,7 @@ def repos_to_wc(sbox): expected_output = svntest.actions.get_virginal_state(wc_dir, 1) expected_output.add({ - 'pi' : Item(status='A ', wc_rev='0', entry_rev='1'), - # And from the foreign repository + 'pi' : Item(status='A ', wc_rev='0'), 'E' : Item(status='A ', wc_rev='0'), 'E/beta' : Item(status='A ', wc_rev='0'), 'E/alpha' : Item(status='A ', wc_rev='0'), @@ -1341,11 +1319,9 @@ def revision_kinds_local_source(sbox): expected_output = svntest.wc.State(wc_dir, { 'A/mu' : Item(verb='Sending'), }) svntest.main.file_append(mu_path, "New r2 text.\n") - svntest.actions.run_and_verify_commit(wc_dir, expected_output, None, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, None) svntest.main.file_append(mu_path, "New r3 text.\n") - svntest.actions.run_and_verify_commit(wc_dir, expected_output, None, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, None) svntest.actions.run_and_verify_svn(None, [], 'up', '-r2', mu_path) svntest.main.file_append(mu_path, "Working copy.\n") @@ -1440,8 +1416,7 @@ def repos_to_wc_1634(sbox): expected_status.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Now copy the directory back. E_url = sbox.repo_url + "/A/B/E@1" @@ -1552,8 +1527,7 @@ def wc_to_wc_copy_deleted(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Copy including stuff in state not-present svntest.actions.run_and_verify_svn(None, [], 'copy', B_path, B2_path) @@ -1609,8 +1583,7 @@ def wc_to_wc_copy_deleted(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- # Test for copy into a non-existent URL path @@ -1762,7 +1735,34 @@ def mixed_wc_to_url(sbox): 'mkdir', Y_path) # Now copy local A/D/G to create new directory A/D/Z the repository. - svntest.actions.run_and_verify_svn(None, [], + + expected_status = svntest.wc.State(G_path, { + '' : Item(status=' ', wc_rev='1'), + 'X' : Item(status='A ', copied='+', wc_rev='-'), + 'X/F' : Item(status=' ', copied='+', wc_rev='-'), + 'X/E' : Item(status=' ', copied='+', wc_rev='-'), + 'X/E/alpha' : Item(status='D ', copied='+', wc_rev='-'), + 'X/E/beta' : Item(status=' ', copied='+', wc_rev='-'), + 'X/lambda' : Item(status=' ', copied='+', wc_rev='-'), + 'Y' : Item(status='A ', wc_rev='-'), + 'rho' : Item(status='M ', wc_rev='3'), + 'tau' : Item(status=' ', wc_rev='1'), + }) + + svntest.actions.run_and_verify_status(G_path, expected_status) + + expected_output = svntest.verify.UnorderedOutput([ + 'Adding copy of %s\n' % sbox.ospath('A/D/G'), + 'Adding copy of %s\n' % sbox.ospath('A/D/G/X'), + 'Deleting copy of %s\n' % sbox.ospath('A/D/G/X/E/alpha'), + 'Adding copy of %s\n' % sbox.ospath('A/D/G/Y'), + 'Deleting copy of %s\n' % sbox.ospath('A/D/G/pi'), + 'Replacing copy of %s\n' % sbox.ospath('A/D/G/rho'), + 'Transmitting file data .done\n', + 'Committing transaction...\n', + 'Committed revision 4.\n', + ]) + svntest.actions.run_and_verify_svn(expected_output, [], 'cp', '-m', "Make a copy.", G_path, Z_url) expected_output = svntest.verify.UnorderedOutput([ @@ -1958,8 +1958,7 @@ def force_move(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) svntest.actions.run_and_verify_svn(expected_file_content, [], 'cat', sbox.repo_url + '/dest') @@ -2020,9 +2019,7 @@ def copy_copied_file_and_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) def move_copied_file_and_dir(sbox): @@ -2075,9 +2072,7 @@ def move_copied_file_and_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) def move_moved_file_and_dir(sbox): @@ -2134,9 +2129,7 @@ def move_moved_file_and_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) def move_file_within_moved_dir(sbox): @@ -2203,9 +2196,7 @@ def move_file_within_moved_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) def move_file_out_of_moved_dir(sbox): @@ -2271,9 +2262,7 @@ def move_file_out_of_moved_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) def move_dir_within_moved_dir(sbox): @@ -2339,9 +2328,7 @@ def move_dir_within_moved_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) def move_dir_out_of_moved_dir(sbox): @@ -2406,9 +2393,7 @@ def move_dir_out_of_moved_dir(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Includes regression testing for issue #3429 ("svn mv A B; svn mv B A" # generates replace without history). @@ -2437,9 +2422,7 @@ def move_file_back_and_forth(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Includes regression testing for issue #3429 ("svn mv A B; svn mv B A" @@ -2584,9 +2567,7 @@ def copy_move_added_paths(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Run_and_verify_commit() doesn't handle status of unversioned paths # so manually confirm unversioned paths got copied and moved too. @@ -2677,9 +2658,7 @@ def copy_added_paths_with_props(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True) def copy_added_paths_to_URL(sbox): @@ -2769,9 +2748,7 @@ def copy_added_paths_to_URL(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Created expected output for update expected_output = svntest.wc.State(wc_dir, { @@ -2964,9 +2941,7 @@ def move_multiple_wc(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -3011,9 +2986,7 @@ def copy_multiple_wc(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -3186,8 +3159,7 @@ def copy_multiple_repo_wc(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -3490,9 +3462,7 @@ def old_dir_wc_to_wc(sbox): # Commit the one file. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -3532,9 +3502,7 @@ def copy_make_parents_wc_wc(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- # Test copying and creating parents from the repo to the wc @@ -3574,9 +3542,7 @@ def copy_make_parents_repo_wc(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -3761,8 +3727,7 @@ def URI_encoded_repos_to_wc(sbox): {dest_name : Item(verb='Adding')}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) copy_URL_to_WC('A', 'A COPY', 2) copy_URL_to_WC('A COPY', 'A_COPY_2', 3) @@ -3986,9 +3951,9 @@ def path_move_and_copy_between_wcs_2475( # Do a checkout, and verify the resulting output and disk contents. svntest.actions.run_and_verify_checkout(repo_url2, - wc2_dir, - expected_output, - expected_wc) + wc2_dir, + expected_output, + expected_wc) # Copy a file from wc to wc2 mu_path = sbox.ospath('A/mu') @@ -4136,8 +4101,7 @@ def copy_below_copy(sbox): svntest.actions.run_and_verify_commit(sbox.wc_dir, expected_output, - expected_status, - None, sbox.wc_dir) + expected_status) def move_below_move(sbox): "move a dir below a moved dir" @@ -4198,8 +4162,7 @@ def move_below_move(sbox): svntest.actions.run_and_verify_commit(sbox.wc_dir, expected_output, - expected_status, - None, sbox.wc_dir) + expected_status) def reverse_merge_move(sbox): @@ -4320,7 +4283,7 @@ def nonrecursive_commit_of_copy(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, + [], wc_dir, '--depth', 'immediates') # Regression test for issue #3474 - making a new subdir, moving files into it @@ -4499,8 +4462,7 @@ def move_dir_containing_move(sbox): 'A/B_moved/F_moved', moved_from=None) svntest.actions.run_and_verify_commit(sbox.wc_dir, expected_output, - expected_status, - None, sbox.wc_dir) + expected_status) def copy_dir_with_space(sbox): """copy a directory with whitespace to one without""" @@ -4529,8 +4491,7 @@ def copy_dir_with_space(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) svntest.actions.run_and_verify_svn(None, [], 'cp', sbox.ospath('E with spaces'), @@ -4555,8 +4516,7 @@ def copy_dir_with_space(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) svntest.actions.run_and_verify_svn(None, [], 'mv', sbox.ospath('E with spaces'), @@ -4588,8 +4548,7 @@ def copy_dir_with_space(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Regression test for issue #3676 @Issue(3676) @@ -4721,9 +4680,7 @@ def mixed_rev_copy_del(sbox): expected_status.remove('A/B/E/alpha') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Update to r2, then update A/B/E/alpha and A/B/E/beta to r1 svntest.main.run_svn(None, 'up', wc_dir) @@ -4740,8 +4697,7 @@ def mixed_rev_copy_del(sbox): expected_status.tweak('A/B/E/beta', wc_rev=1) svntest.actions.run_and_verify_update(wc_dir, expected_output, None, - expected_status, [], - None, None, None, None, None, + expected_status, [], False, '-r1', sbox.ospath('A/B/E/alpha'), sbox.ospath('A/B/E/beta')) @@ -4778,9 +4734,7 @@ def mixed_rev_copy_del(sbox): expected_status.remove('A/B/E_copy/alpha', 'A/B/E_copy/beta') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) def copy_delete_undo(sbox, use_revert): "copy, delete child, undo" @@ -5055,7 +5009,7 @@ def copy_wc_url_with_absent(sbox): expected_output, None, None, - None, None, None, None, None, False, + [], False, wc_dir, '--set-depth', 'infinity') # Except for A/no, the 3 directories should now have the same children @@ -5430,6 +5384,13 @@ def copy_and_move_conflicts(sbox): 'D/G/pi', 'D/G/rho', 'D/G/tau') + expected_status.tweak('B', moved_from='../A/B') + expected_status.tweak('D', moved_from='../A/D') + expected_status.tweak('H', moved_from='D/H') + expected_status.tweak('Q', moved_from='../A/Q') + expected_status.tweak('D/H', moved_to='H') + expected_status.tweak('alpha', moved_from='B/E/alpha') + expected_status.tweak('B/E/alpha', moved_to='alpha') svntest.actions.run_and_verify_status(wc('move-dest'), expected_status) expected_disk = svntest.wc.State('', { @@ -5629,8 +5590,7 @@ def wc_wc_copy_incomplete(sbox): expected_status.remove('A/B2/E', 'A/B2/F') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) expected_status.add({ 'A/B2/E' : Item(status='! ', wc_rev=3), 'A/B2/F' : Item(status='! ', wc_rev=3), @@ -5691,8 +5651,7 @@ def three_nested_moves(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) def copy_to_unversioned_parent(sbox): "copy to unversioned parent" @@ -5830,8 +5789,7 @@ def ext_wc_copy_deleted(sbox): }) svntest.actions.run_and_verify_commit(wc2_dir, - expected_output, None, None, - wc2_dir) + expected_output, None) def copy_subtree_deleted(sbox): "copy to-be-deleted subtree" @@ -5850,7 +5808,7 @@ def copy_subtree_deleted(sbox): 'AA/B' : Item(verb='Deleting'), }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, None, None, + expected_output, None, [], sbox.ospath('AA')) # Commit copy between working copies @@ -5862,9 +5820,19 @@ def copy_subtree_deleted(sbox): 'AA2/B' : Item(verb='Deleting'), }) svntest.actions.run_and_verify_commit(wc2_dir, - expected_output, None, None, - wc2_dir) + expected_output, None) + +def resurrect_at_root(sbox): + "resurrect directory at root" + + sbox.build(create_wc=False) + + svntest.actions.run_and_verify_svn(None, [], 'rm', sbox.repo_url + '/A', + '-m', '') + svntest.actions.run_and_verify_svn(None, [], 'cp', + sbox.repo_url + '/A/D/H@1', + sbox.repo_url + '/A', '-m', '') ######################################################################## # Run the tests @@ -5986,6 +5954,7 @@ test_list = [ None, copy_relocate, ext_wc_copy_deleted, copy_subtree_deleted, + resurrect_at_root, ] if __name__ == '__main__': Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/dav-mirror-autocheck.sh URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/dav-mirror-autocheck.sh?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/dav-mirror-autocheck.sh (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/dav-mirror-autocheck.sh Sun Jun 14 20:58:10 2015 @@ -23,7 +23,7 @@ # to the slave. The test should be able to throw all kinds # of svn operations at one or the other, and master/slave # verified as identical in the end. -# +# # Master / slave setup is achieved in a single httpd process # using virtual hosts bound to different addresses on the # loopback network (127.0.0.1, 127.0.0.2) for slave and @@ -34,7 +34,7 @@ # http://subversion.tigris.org/issues/show_bug.cgi?id=2939 # But of course, any svn traffic liable to break over # mirroring would be a good addition. -# +# # Most of the httpd setup was lifted from davautocheck.sh. # The common boilerplate snippets to setup/start/stop httpd # between the two could be factored out and shared. @@ -95,7 +95,7 @@ function get_prog_name() { return 1 } -# splat out httpd config +# splat out httpd config function setup_config() { say "setting up config: " $1 @@ -152,7 +152,7 @@ CustomLog "${HTTPD_ROOT}/ops" ServerName ${SLAVE_HOST} CustomLog "${HTTPD_ROOT}/slave_access_log" common ErrorLog "${HTTPD_ROOT}/slave_error_log" -# slave 'normal' location +# slave 'normal' location <Location "/${SLAVE_LOCATION}"> DAV svn SVNPath "${SLAVE_REPOS}" @@ -196,7 +196,7 @@ function usage() { echo echo " " '<test-work-directory>' must not exist, \ I will not clobber it for you 1>&2 - exit 1 + exit 1 } ### Start execution here ### @@ -403,7 +403,7 @@ $SVNSYNC initialize --non-interactive "$ # # reproducible test case from: # http://subversion.tigris.org/issues/show_bug.cgi?id=2939 -# +# BASE_URL="$SLAVE_URL" say running svnmucc test to $BASE_URL svnmucc="$SVNMUCC --non-interactive --username jrandom --password rayjandom -mm" @@ -492,7 +492,7 @@ say "Some house-keeping..." say "Re-activating the post-commit hook on the master repo: $MASTER_REPOS." mv "$MASTER_REPOS/hooks/post-commit_" "$MASTER_REPOS/hooks/post-commit" say "Syncing slave with master." -$SVNSYNC --non-interactive sync "$SYNC_URL" --username=svnsync --password=svnsync +$SVNSYNC --non-interactive sync "$SYNC_URL" --username=svnsync --password=svnsync # shut it down echo -n "${SCRIPT}: stopping httpd: " $HTTPD -f $HTTPD_CONFIG -k stop Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/davautocheck.sh URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/davautocheck.sh?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/davautocheck.sh (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/davautocheck.sh Sun Jun 14 20:58:10 2015 @@ -62,7 +62,7 @@ # one version's client against another version's server) specify both APXS # *and* MODULE_PATH for the other server: # -# APXS=/opt/svn/1.4.x/bin/apxs MODULE_PATH=/opt/svn/1.4.x/modules \ +# APXS=/opt/svn/1.4.x/bin/apxs MODULE_PATH=/opt/svn/1.4.x/modules \ # subversion/tests/cmdline/davautocheck.sh # # To prevent the server from advertising httpv2, pass USE_HTTPV1 in @@ -71,7 +71,7 @@ # To enable "SVNCacheRevProps on" set CACHE_REVPROPS in the environment. # # To test over https set USE_SSL in the environment. -# +# # To use value for "SVNPathAuthz" directive set SVN_PATH_AUTHZ with # appropriate value in the environment. # @@ -114,7 +114,7 @@ query() { if [ -n "$BASH_VERSION" ]; then read -n 1 -t 32 else - # + # prog=" import select as s import sys @@ -163,7 +163,7 @@ get_prog_name() { } # Don't assume sbin is in the PATH. -# ### Presumably this is used to locate /usr/sbin/apxs or /usr/sbin/apache2 +# ### Presumably this is used to locate /usr/sbin/apxs or /usr/sbin/apache2 PATH="$PATH:/usr/sbin:/usr/local/sbin" # Find the source and build directories. The build dir can be found if it is @@ -318,12 +318,18 @@ fi # Stop any previous instances, os we can re-use the port. if [ -x $STOPSCRIPT ]; then $STOPSCRIPT ; sleep 1; fi +ss > /dev/null 2>&1 || netstat > /dev/null 2>&1 || fail "unable to find ss or netstat required to find a free port" + HTTPD_PORT=3691 -while netstat -an | grep $HTTPD_PORT | grep 'LISTEN' >/dev/null; do +while \ + (ss -ltn sport = :$HTTPD_PORT 2>&1 | grep :$HTTPD_PORT > /dev/null ) \ + || \ + (netstat -an 2>&1 | grep $HTTPD_PORT | grep 'LISTEN' > /dev/null ) \ + do HTTPD_PORT=$(( HTTPD_PORT + 1 )) if [ $HTTPD_PORT -eq 65536 ]; then # Most likely the loop condition is true regardless of $HTTPD_PORT - fail "netstat claims you have no free ports for httpd to listen on." + fail "ss/netstat claim you have no free ports for httpd to listen on." fi done HTTPD_ROOT="$ABS_BUILDDIR/subversion/tests/cmdline/httpd-$(date '+%Y%m%d-%H%M%S')" @@ -596,12 +602,7 @@ if [ $# -eq 1 ] && [ "x$1" = 'x--gdb' ]; exit fi - -if type time > /dev/null; then - TIME_CMD=time -else - TIME_CMD="" -fi +if type time > /dev/null ; then TIME_CMD() { time "$@"; } ; else TIME_CMD() { "$@"; } ; fi MAKE=${MAKE:-make} @@ -620,13 +621,13 @@ else fi if [ $# = 0 ]; then - $TIME_CMD "$MAKE" check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR + TIME_CMD "$MAKE" check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR r=$? else (cd "$ABS_BUILDDIR/subversion/tests/cmdline/" TEST="$1" shift - $TIME_CMD "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $SSL_TEST_ARG "$@") + TIME_CMD "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $SSL_TEST_ARG "$@") r=$? fi
