You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/03/26 16:43:13 UTC

svn commit: r1669359 - /subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py

Author: julianfoad
Date: Thu Mar 26 15:43:13 2015
New Revision: 1669359

URL: http://svn.apache.org/r1669359
Log:
On the 'move-tracking-2' branch: robustify the test code a bit.

* subversion/tests/cmdline/svnmover_tests.py
  (initial_content_A_iota): Use an error-checked function to run svnmover.
  (test_svnmover,
   xtest_svnmover): Catch bad exit codes.

Modified:
    subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py?rev=1669359&r1=1669358&r2=1669359&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py Thu Mar 26 15:43:13 2015
@@ -59,9 +59,9 @@ def populate_trunk(sbox, trunk):
 def initial_content_A_iota(sbox):
   """Commit something in place of a greek tree for revision 1.
   """
-  svntest.main.run_svnmover('-U', sbox.repo_url,
-                            'mkdir', 'A',
-                            'put', mk_file(sbox, 'iota'), 'iota')
+  test_svnmover(sbox.repo_url, None,
+                'mkdir A',
+                'put', mk_file(sbox, 'iota'), 'iota')
 
 def initial_content_ttb(sbox):
   """Make a 'trunk' branch and 'tags' and 'branches' dirs.
@@ -102,7 +102,7 @@ def test_svnmover(repo_url, expected_pat
   # First, run svnmover.
   exit_code, outlines, errlines = svntest.main.run_svnmover('-U', repo_url,
                                                             *varargs)
-  if errlines:
+  if exit_code or errlines:
     raise svntest.main.SVNCommitFailure(str(errlines))
   if not any(map(_commit_re.match, outlines)):
     raise svntest.main.SVNLineUnequal(str(outlines))
@@ -139,6 +139,8 @@ def xtest_svnmover(repo_url, error_re_st
   # First, run svnmover.
   exit_code, outlines, errlines = svntest.main.run_svnmover('-U', repo_url,
                                                             *varargs)
+  if not exit_code:
+    raise svntest.main.Failure("Expected an error, but exit code is 0")
   if error_re_string:
     if not error_re_string.startswith(".*"):
       error_re_string = ".*(" + error_re_string + ")"