You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/06/15 22:21:26 UTC
svn commit: r955038 -
/subversion/trunk/subversion/tests/cmdline/svntest/main.py
Author: hwright
Date: Tue Jun 15 20:21:26 2010
New Revision: 955038
URL: http://svn.apache.org/viewvc?rev=955038&view=rev
Log:
Only parse test options if the options object is not already supplied.
* subversion/tests/cmdline/svntest/main.py
(_parse_options): New.
(run_tests): Run the new function, if options are not already supplied.
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/main.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=955038&r1=955037&r2=955038&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Tue Jun 15 20:21:26 2010
@@ -1278,28 +1278,12 @@ def _internal_run_tests(test_list, testn
return exit_code
-# Main func. This is the "entry point" that all the test scripts call
-# to run their list of tests.
-#
-# This routine parses sys.argv to decide what to do.
-def run_tests(test_list, serial_only = False):
- """Main routine to run all tests in TEST_LIST.
+def _parse_options():
+ """Parse the arguments in arg_list, and set the global options object with
+ the results"""
- NOTE: this function does not return. It does a sys.exit() with the
- appropriate exit code.
- """
-
- global pristine_url
- global svn_binary
- global svnadmin_binary
- global svnlook_binary
- global svnsync_binary
- global svndumpfilter_binary
- global svnversion_binary
global options
- testnums = []
-
# set up the parser
usage = 'usage: %prog [options] [<test> ...]'
parser = optparse.OptionParser(usage=usage)
@@ -1372,6 +1356,36 @@ def run_tests(test_list, serial_only = F
else:
options.test_area_url = options.url
+ return args
+
+
+# Main func. This is the "entry point" that all the test scripts call
+# to run their list of tests.
+#
+# This routine parses sys.argv to decide what to do.
+def run_tests(test_list, serial_only = False):
+ """Main routine to run all tests in TEST_LIST.
+
+ NOTE: this function does not return. It does a sys.exit() with the
+ appropriate exit code.
+ """
+
+ global pristine_url
+ global svn_binary
+ global svnadmin_binary
+ global svnlook_binary
+ global svnsync_binary
+ global svndumpfilter_binary
+ global svnversion_binary
+ global options
+
+ testnums = []
+
+ if not options:
+ args = _parse_options()
+ else:
+ args = []
+
# parse the positional arguments (test nums, names)
for arg in args:
appended = False