You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/02/04 15:34:38 UTC

svn commit: r1067182 - in /subversion/trunk: build/run_tests.py subversion/tests/cmdline/svntest/main.py

Author: rhuijben
Date: Fri Feb  4 14:34:38 2011
New Revision: 1067182

URL: http://svn.apache.org/viewvc?rev=1067182&view=rev
Log:
Fix the -t option to run just some tests using win-tests.py, which was broken
since the testrunner infrastructure switched to using less processes.

* subversion/tests/cmdline/svntest/main.py
  (_run_py_test): Pass the test selection to execute_tests().
  
* build/run_tests.py
  (execute_tests): Use the passed test_selection if we have an existing set
    of options.

Modified:
    subversion/trunk/build/run_tests.py
    subversion/trunk/subversion/tests/cmdline/svntest/main.py

Modified: subversion/trunk/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=1067182&r1=1067181&r2=1067182&view=diff
==============================================================================
--- subversion/trunk/build/run_tests.py (original)
+++ subversion/trunk/build/run_tests.py Fri Feb  4 14:34:38 2011
@@ -390,11 +390,17 @@ class TestHarness:
       prog_f = None
     else:
       prog_f = progress_func
+      
+    if test_nums:
+      test_selection = [test_nums]
+    else:
+      test_selection = []
 
     failed = svntest.main.execute_tests(prog_mod.test_list,
                                         serial_only=serial_only,
                                         test_name=progbase,
-                                        progress_func=prog_f)
+                                        progress_func=prog_f,
+                                        test_selection=test_selection)
 
     # restore some values
     sys.path = old_path

Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1067182&r1=1067181&r2=1067182&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Fri Feb  4 14:34:38 2011
@@ -1476,7 +1476,7 @@ def run_tests(test_list, serial_only = F
 #
 # This routine parses sys.argv to decide what to do.
 def execute_tests(test_list, serial_only = False, test_name = None,
-                  progress_func = None):
+                  progress_func = None, test_selection = []):
   """Similar to run_tests(), but just returns the exit code, rather than
   exiting the process.  This function can be used when a caller doesn't
   want the process to die."""
@@ -1497,13 +1497,14 @@ def execute_tests(test_list, serial_only
   testnums = []
 
   if not options:
+    # Override which tests to run from the commandline
     (parser, args) = _parse_options()
+    test_selection = args
   else:
-    args = []
     parser = _create_parser()
 
   # parse the positional arguments (test nums, names)
-  for arg in args:
+  for arg in test_selection:
     appended = False
     try:
       testnums.append(int(arg))