subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1718426 - in /subversion/branches/ra-git/subversion/tests/cmdline: ./ getopt_tests_data/
Date Mon, 07 Dec 2015 16:59:15 GMT
Author: rhuijben
Date: Mon Dec  7 16:59:15 2015
New Revision: 1718426

URL: http://svn.apache.org/viewvc?rev=1718426&view=rev
Log:
On the ra-git branch: Extend getopt tests to also verify some version output from
svnadmin.

* subversion/tests/cmdline/getopt_tests.py
  (del_lines_res): Tweak line.
  (run_one_admin_test): New function.
  (getopt_admin__version,
   getopt_admin__version__quiet): New function.
  (test_list): Add two tests.

* subversion/tests/cmdline/getopt_tests_data/svnadmin--version--quiet_stderr
* subversion/tests/cmdline/getopt_tests_data/svnadmin--version--quiet_stdout
* subversion/tests/cmdline/getopt_tests_data/svnadmin--version_stderr
* subversion/tests/cmdline/getopt_tests_data/svnadmin--version_stdout
  New testdata, based on the svn version.

Added:
    subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svnadmin--version--quiet_stderr
      - copied unchanged from r1718380, subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version--quiet_stderr
    subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svnadmin--version--quiet_stdout
      - copied unchanged from r1718380, subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version--quiet_stdout
    subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svnadmin--version_stderr
      - copied unchanged from r1718380, subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version_stderr
    subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svnadmin--version_stdout
      - copied, changed from r1718380, subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout
Modified:
    subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py

Modified: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py?rev=1718426&r1=1718425&r2=1718426&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py Mon Dec  7 16:59:15
2015
@@ -74,7 +74,7 @@ del_lines_res = [
                  re.compile(r"  - with Cyrus SASL authentication"),
                  re.compile(r"  - using serf \d+\.\d+\.\d+"),
                  re.compile(r"  - using libgit2 \d+\.\d+\.\d+"),
-                 re.compile(r"\* fs_(base|fs) :"),
+                 re.compile(r"\* fs_(base|fs|x|git) :"),
 
                  # Remove 'svn --version' list of platform-specific
                  # auth cache providers.
@@ -192,6 +192,35 @@ def run_one_test(sbox, basename, *vararg
   svntest.verify.compare_and_display_lines("Standard error does not match.",
                                            "STDERR", exp_stderr, actual_stderr)
 
+def run_one_admin_test(sbox, basename, *varargs):
+  "run svn with args and compare against the specified output files"
+
+  ### no need to use sbox.build() -- we don't need a repos or working copy
+  ### for these tests.
+
+  exp_stdout, exp_stderr = load_expected_output(basename)
+
+  # special case the 'svn' test so that no extra arguments are added
+  if basename != 'svnadmin':
+    exit_code, actual_stdout, actual_stderr = svntest.main.run_svnadmin(*varargs)
+  else:
+    exit_code, actual_stdout, actual_stderr = svntest.main.run_command(svntest.main.svnadmin_binary,
+                                                                       1, False, *varargs)
+
+  # Delete and perform search and replaces on the lines from the
+  # actual and expected output that may differ between build
+  # environments.
+  exp_stdout    = process_lines(exp_stdout)
+  exp_stderr    = process_lines(exp_stderr)
+  actual_stdout = process_lines(actual_stdout)
+  actual_stderr = process_lines(actual_stderr)
+
+  svntest.verify.compare_and_display_lines("Standard output does not match.",
+                                           "STDOUT", exp_stdout, actual_stdout)
+
+  svntest.verify.compare_and_display_lines("Standard error does not match.",
+                                           "STDERR", exp_stderr, actual_stderr)
+
 def getopt_no_args(sbox):
   "run svn with no arguments"
   run_one_test(sbox, 'svn')
@@ -236,6 +265,14 @@ def getopt_config_option(sbox):
                                         '-u -p',
                                       sbox.repo_url)
 
+def getopt_admin__version(sbox):
+  "run svnadmin --version"
+  run_one_admin_test(sbox, 'svnadmin--version', '--version')
+
+def getopt_admin__version__quiet(sbox):
+  "run svnadmin --version --quiet"
+  run_one_admin_test(sbox, 'svnadmin--version--quiet', '--version', '--quiet')
+
 ########################################################################
 # Run the tests
 
@@ -251,6 +288,8 @@ test_list = [ None,
               getopt_help_bogus_cmd,
               getopt_help_log_switch,
               getopt_config_option,
+              getopt_admin__version,
+              getopt_admin__version__quiet,
             ]
 
 if __name__ == '__main__':

Copied: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svnadmin--version_stdout
(from r1718380, subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout)
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svnadmin--version_stdout?p2=subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svnadmin--version_stdout&p1=subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout&r1=1718380&r2=1718426&rev=1718426&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout
(original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svnadmin--version_stdout
Mon Dec  7 16:59:15 2015
@@ -1,26 +1,15 @@
-svn, version 1.9.0-dev (under development)
-   compiled Feb 26 2014, 15:15:42 on x86_64-unknown-openbsd5.5
+svnadmin, version 1.10.0-dev (under development)
+   compiled Dec  4 2015, 00:19:41 on x86/x86_64-microsoft-windows6.2.9200
 
-Copyright (C) 2014 The Apache Software Foundation.
+Copyright (C) 2015 The Apache Software Foundation.
 This software consists of contributions made by many people;
 see the NOTICE file for more information.
 Subversion is open source software, see http://subversion.apache.org/
 
-The following repository access (RA) modules are available:
+The following repository back-end (FS) modules are available:
 
-* ra_svn : Module for accessing a repository using the svn network protocol.
-  - with Cyrus SASL authentication
-  - handles 'svn' scheme
-* ra_local : Module for accessing a repository on local disk.
-  - handles 'file' scheme
-* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
-  - using serf 1.3.3
-  - handles 'http' scheme
-  - handles 'https' scheme
-
-The following authentication credential caches are available:
-
-* Plaintext cache in /home/stsp/.subversion
-* Gnome Keyring
-* GPG-Agent
+* fs_fs : Module for working with a plain file (FSFS) repository.
+* fs_x : Module for working with an experimental (FSX) repository.
+* fs_base : Module for working with a Berkeley DB repository.
+* fs_git : Experimental module for reading a GIT repository.
 



Mime
View raw message