~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/tests/cmdline/schedule_tests.py

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
    file_ospath = sbox.ospath(fileName)
185
185
    if executable:
186
186
      expected_out = ["*\n"]
 
187
      expected_err = []
187
188
    else:
188
189
      expected_out = []
 
190
      expected_err = '.*W200017: Property.*not found'
189
191
 
190
192
    # create an empty file
191
193
    open(file_ospath, "w")
192
194
 
193
195
    os.chmod(file_ospath, perm)
194
196
    sbox.simple_add(fileName)
195
 
    svntest.actions.run_and_verify_svn(None, expected_out, [],
 
197
    svntest.actions.run_and_verify_svn(expected_out, expected_err,
196
198
                                       'propget', "svn:executable", file_ospath)
197
199
 
198
200
  test_cases = [
276
278
  epsilon_path = sbox.ospath('A/D/G/epsilon')
277
279
  files = [delta_path, zeta_path, epsilon_path]
278
280
 
279
 
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
 
281
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
280
282
                                                              'revert',
281
283
                                                              '--recursive',
282
284
                                                              wc_dir)
296
298
  Z_path = sbox.ospath('A/D/H/Z')
297
299
  files = [X_path, Y_path, Z_path]
298
300
 
299
 
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
 
301
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
300
302
                                                              'revert',
301
303
                                                              '--recursive',
302
304
                                                              wc_dir)
322
324
           + [os.path.join(Z_path, child)
323
325
              for child in ['R', 'zeta']])
324
326
 
325
 
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
 
327
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
326
328
                                                              'revert',
327
329
                                                              '--recursive',
328
330
                                                              wc_dir)
343
345
  other_path = sbox.ospath('other_exe')
344
346
  files = [all_path, none_path, user_path, group_path, other_path]
345
347
 
346
 
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
 
348
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
347
349
                                                              'revert',
348
350
                                                              '--recursive',
349
351
                                                              wc_dir)
364
366
  omega_path = sbox.ospath('A/D/H/omega')
365
367
  files = [iota_path, mu_path, omega_path, rho_path]
366
368
 
367
 
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
 
369
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
368
370
                                                              'revert',
369
371
                                                              '--recursive',
370
372
                                                              wc_dir)
390
392
  files = [E_path, F_path, H_path,
391
393
           alpha_path, beta_path, chi_path, omega_path, psi_path]
392
394
 
393
 
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
 
395
  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
394
396
                                                              'revert',
395
397
                                                              '--recursive',
396
398
                                                              wc_dir)
493
495
 
494
496
  svntest.actions.run_and_verify_commit(wc_dir,
495
497
                                        expected_output,
496
 
                                        expected_status,
497
 
                                        None, wc_dir)
 
498
                                        expected_status)
498
499
 
499
500
#----------------------------------------------------------------------
500
501
# Regression test for issue #854:
553
554
 
554
555
  # Update will *not* remove the entry for A despite it being marked
555
556
  # deleted.
556
 
  svntest.actions.run_and_verify_svn(None, exp_noop_up_out(2), [],
 
557
  svntest.actions.run_and_verify_svn(exp_noop_up_out(2), [],
557
558
                                     'up', wc_dir)
558
559
  expected_status.tweak('', 'iota', wc_rev=2)
559
560
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
567
568
def add_recursive_already_versioned(sbox):
568
569
  "'svn add' should traverse already-versioned dirs"
569
570
 
 
571
  sbox.build()
570
572
  wc_dir = sbox.wc_dir
571
573
 
572
 
  svntest.actions.make_repo_and_wc(sbox)
573
 
 
574
574
  # Create some files, then schedule them for addition
575
575
  delta_path = sbox.ospath('delta')
576
576
  zeta_path = sbox.ospath('A/B/zeta')
616
616
  os.makedirs(sbox.wc_dir)
617
617
 
618
618
  os.chdir(sbox.wc_dir)
619
 
  svntest.actions.run_and_verify_svn('Failed mkdir',
620
 
                                     None, svntest.verify.AnyOutput,
 
619
  svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
621
620
                                     'mkdir', 'A')
622
621
  if os.path.exists('A'):
623
622
    raise svntest.Failure('svn mkdir created an unversioned directory')
636
635
  wc_dir = sbox.wc_dir
637
636
 
638
637
  os.chdir(wc_dir)
639
 
  svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
 
638
  svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
640
639
                                     'rm', '--force', 'non-existent')
641
640
 
642
641
 
651
650
  B_path = os.path.join(wc_dir, 'A', 'B')
652
651
 
653
652
  # Delete 'A/B' using --keep-local, then remove at the OS level.
654
 
  svntest.actions.run_and_verify_svn(None, None, [],
 
653
  svntest.actions.run_and_verify_svn(None, [],
655
654
                                     'rm', '--keep-local', B_path)
656
655
  svntest.main.safe_rmtree(B_path)
657
656
 
669
668
  ### information stored now in the working copy root's one DB.  That
670
669
  ### could change the whole flow of this test, possible leading us to
671
670
  ### remove it as altogether irrelevant.  --cmpilato
672
 
  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
 
671
  svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir)
673
672
 
674
673
  # Now try to run
675
 
  svntest.actions.run_and_verify_svn(None, None, [],
 
674
  svntest.actions.run_and_verify_svn(None, [],
676
675
                                     'rm', '--keep-local', B_path)
677
676
 
678
677
def propset_on_deleted_should_fail(sbox):
681
680
  wc_dir = sbox.wc_dir
682
681
  iota = os.path.join(wc_dir, 'iota')
683
682
 
684
 
  svntest.actions.run_and_verify_svn(None, None, [], 'rm', iota)
 
683
  svntest.actions.run_and_verify_svn(None, [], 'rm', iota)
685
684
 
686
 
  svntest.actions.run_and_verify_svn(None, None, "svn: E155023: Can't set propert.*",
 
685
  svntest.actions.run_and_verify_svn(None, "svn: E155023: Can't set propert.*",
687
686
                                     'ps', 'prop', 'val', iota)
688
687
 
689
688
@Issue(3468)
721
720
 
722
721
  svntest.actions.run_and_verify_commit(sbox.wc_dir,
723
722
                                        expected_output,
724
 
                                        expected_status,
725
 
                                        None, sbox.wc_dir)
 
723
                                        expected_status)
726
724
 
727
725
 
728
726
########################################################################