subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1657904 - /subversion/trunk/subversion/tests/cmdline/svntest/actions.py
Date Fri, 06 Feb 2015 17:24:14 GMT
Author: julianfoad
Date: Fri Feb  6 17:24:13 2015
New Revision: 1657904

URL: http://svn.apache.org/r1657904
Log:
Another tiny robustness improvement and simplification in the test suite.

* subversion/tests/cmdline/svntest/actions.py
  (run_and_verify_load): Simplify. Avoid redundant checking of stderr, which
    is already done by run_command_stdin.
  (run_and_verify_dump): Simplify and make more robust (the exit code is now
    checked), using run_and_verify_svnadmin.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/actions.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/actions.py?rev=1657904&r1=1657903&r2=1657904&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/actions.py Fri Feb  6 17:24:13 2015
@@ -338,28 +338,22 @@ def run_and_verify_load(repo_dir, dump_f
   if not isinstance(dump_file_content, list):
     raise TypeError("dump_file_content argument should have list type")
   expected_stderr = []
+  args = ()
   if bypass_prop_validation:
-    exit_code, output, errput = main.run_command_stdin(
-      main.svnadmin_binary, expected_stderr, 0, True, dump_file_content,
-      'load', '--force-uuid', '--quiet', '--bypass-prop-validation', repo_dir)
-  else:
-    exit_code, output, errput = main.run_command_stdin(
-      main.svnadmin_binary, expected_stderr, 0, True, dump_file_content,
-      'load', '--force-uuid', '--quiet', repo_dir)
-
-  verify.verify_outputs("Unexpected stderr output", None, errput,
-                        None, expected_stderr)
+    args += ('--bypass-prop-validation',)
+  main.run_command_stdin(
+    main.svnadmin_binary, expected_stderr, 0, True, dump_file_content,
+    'load', '--force-uuid', '--quiet', repo_dir, *args)
 
 
 def run_and_verify_dump(repo_dir, deltas=False):
   "Runs 'svnadmin dump' and reports any errors, returning the dump content."
+  args = ()
   if deltas:
-    exit_code, output, errput = main.run_svnadmin('dump', '--quiet', '--deltas',
-                                                  repo_dir)
-  else:
-    exit_code, output, errput = main.run_svnadmin('dump', '--quiet', repo_dir)
-  verify.verify_outputs("Missing expected output(s)", output, errput,
-                        verify.AnyOutput, [])
+    args += ('--deltas',)
+  exit_code, output, errput = run_and_verify_svnadmin(
+                                None, verify.AnyOutput, [],
+                                'dump', '--quiet', repo_dir, *args)
   return output
 
 



Mime
View raw message