You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2015/09/05 12:14:38 UTC

svn commit: r1701367 - in /subversion/branches/1.9.x-r1700215: ./ build/run_tests.py subversion/tests/cmdline/svntest/main.py win-tests.py

Author: brane
Date: Sat Sep  5 10:14:38 2015
New Revision: 1701367

URL: http://svn.apache.org/r1701367
Log:
On the 1.9.x-r1700215 branch: Cherry-pick revisions 1700215,
1700219, 1700220 and 1701270 from trunk and resolve conflicts.

Modified:
    subversion/branches/1.9.x-r1700215/   (props changed)
    subversion/branches/1.9.x-r1700215/build/run_tests.py
    subversion/branches/1.9.x-r1700215/subversion/tests/cmdline/svntest/main.py
    subversion/branches/1.9.x-r1700215/win-tests.py

Propchange: subversion/branches/1.9.x-r1700215/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Sep  5 10:14:38 2015
@@ -93,4 +93,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
 0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674301,1674305,1674308,1674339-1674340,1674406,1674415,1674455-1674456,1674475,1674487,1674522,1674580,1674626-1674627,1674785,1674891,1675771,1675774,1676526,1676535,1676538,1676555,1676564,1676570,1676665,1676667,1676769,1677003,1677191,1677267,1677440,1678147,1678149,1678494,1678571,1678734,1678742,1678745-1678746,1678839,1678846,1678894,1678950,1678963,1679166,1679169,1679228,1679230,1679287,1679864,1679866,1679909,1680242,1680264,1680495,1680705,1680819,1681317,1682714,1682854,1683071,1683126,1683135,1683290,1683303,1683311,1683378,1683387,1684034,1684077,1684322,1684325,1684344,1684412,1684940,1685034,1685085,1686175,1686239,1686478,1686541,1686543,1686554,1686557,1686802,1686888,1686984,1687029,1687304,1687389,1687769,
 1687776,1688258,1688273,1688395,1689214,1689216,1689721,1689729,1691712-1691713,1691924,1691928,1692091,1692093,1692098,1692448,1692469-1692470,1692798-1692799,1693135,1693138,1693159,1693886,1694023,1694194,1694481,1694929,1695022,1695600,1695606,1695681,1696222,1696225,1696387,1696695,1697381,1697384,1697387,1697664,1697824,1697835,1697845,1697914,1697967,1698106
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
 0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674301,1674305,1674308,1674339-1674340,1674406,1674415,1674455-1674456,1674475,1674487,1674522,1674580,1674626-1674627,1674785,1674891,1675771,1675774,1676526,1676535,1676538,1676555,1676564,1676570,1676665,1676667,1676769,1677003,1677191,1677267,1677440,1678147,1678149,1678494,1678571,1678734,1678742,1678745-1678746,1678839,1678846,1678894,1678950,1678963,1679166,1679169,1679228,1679230,1679287,1679864,1679866,1679909,1680242,1680264,1680495,1680705,1680819,1681317,1682714,1682854,1683071,1683126,1683135,1683290,1683303,1683311,1683378,1683387,1684034,1684077,1684322,1684325,1684344,1684412,1684940,1685034,1685085,1686175,1686239,1686478,1686541,1686543,1686554,1686557,1686802,1686888,1686984,1687029,1687304,1687389,1687769,
 1687776,1688258,1688273,1688395,1689214,1689216,1689721,1689729,1691712-1691713,1691924,1691928,1692091,1692093,1692098,1692448,1692469-1692470,1692798-1692799,1693135,1693138,1693159,1693886,1694023,1694194,1694481,1694929,1695022,1695600,1695606,1695681,1696222,1696225,1696387,1696695,1697381,1697384,1697387,1697664,1697824,1697835,1697845,1697914,1697967,1698106,1700215,1700219-1700220,1701270

Modified: subversion/branches/1.9.x-r1700215/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1700215/build/run_tests.py?rev=1701367&r1=1701366&r2=1701367&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1700215/build/run_tests.py (original)
+++ subversion/branches/1.9.x-r1700215/build/run_tests.py Sat Sep  5 10:14:38 2015
@@ -44,22 +44,18 @@ and filename of a test program, optional
 separated list of test numbers; the default is to run all the tests in it.
 '''
 
-# A few useful constants
-SVN_VER_MINOR = 9
-
-import os, re, subprocess, sys, imp, threading, traceback, exceptions
+import os, sys
+import re
+import optparse, subprocess, imp, threading, traceback, exceptions
 from datetime import datetime
 
-import getopt
-try:
-  my_getopt = getopt.gnu_getopt
-except AttributeError:
-  my_getopt = getopt.getopt
-
 # Ensure the compiled C tests use a known locale (Python tests set the locale
 # explicitly).
 os.environ['LC_ALL'] = 'C'
 
+# Placeholder for the svntest module
+svntest = None
+
 class TextColors:
   '''Some ANSI terminal constants for output color'''
   ENDC = '\033[0;m'
@@ -120,104 +116,220 @@ class TestHarness:
   '''Test harness for Subversion tests.
   '''
 
-  def __init__(self, abs_srcdir, abs_builddir, logfile, faillogfile,
-               base_url=None, fs_type=None, http_library=None,
-               server_minor_version=None, verbose=None,
-               cleanup=None, enable_sasl=None, parallel=None, config_file=None,
-               fsfs_sharding=None, fsfs_packing=None,
-               list_tests=None, svn_bin=None, mode_filter=None,
-               milestone_filter=None, set_log_level=None, ssl_cert=None,
-               http_proxy=None, http_proxy_username=None,
-               http_proxy_password=None, httpd_version=None,
-               exclusive_wc_locks=None,
-               memcached_server=None, skip_c_tests=None,
-               dump_load_cross_check=None):
+  def __init__(self, abs_srcdir, abs_builddir, logfile, faillogfile, opts):
     '''Construct a TestHarness instance.
 
     ABS_SRCDIR and ABS_BUILDDIR are the source and build directories.
     LOGFILE is the name of the log file. If LOGFILE is None, let tests
     print their output to stdout and stderr, and don't print a summary
     at the end (since there's no log file to analyze).
-    BASE_URL is the base url for DAV tests.
-    FS_TYPE is the FS type for repository creation.
-    HTTP_LIBRARY is the HTTP library for DAV-based communications.
-    SERVER_MINOR_VERSION is the minor version of the server being tested.
-    SVN_BIN is the path where the svn binaries are installed.
-    MODE_FILTER restricts the TestHarness to tests with the expected mode
-    XFail, Skip, Pass, or All tests (default).  MILESTONE_FILTER is a
-    string representation of a valid regular expression pattern; when used
-    in conjunction with LIST_TESTS, the only tests that are listed are
-    those with an associated issue in the tracker which has a target
-    milestone that matches the regex.
-    HTTP_PROXY (hostname:port), HTTP_PROXY_USERNAME and HTTP_PROXY_PASSWORD
-    define the params to run the tests over a proxy server.
+    OPTS are the options that will be sent to the tests.
     '''
+
+    # Canonicalize the test base URL
+    if opts.url is not None and opts.url[-1] == '/':
+      opts.url = opts.url[:-1]
+
+    # Make the configfile path absolute
+    if opts.config_file is not None:
+      opts.config_file = os.path.abspath(opts.config_file)
+
+    # Parse out the FSFS version number
+    if (opts.fs_type is not None
+         and opts.fs_type.startswith('fsfs-v')):
+      opts.fsfs_version = int(opts.fs_type[6:])
+      opts.fs_type = 'fsfs'
+    else:
+      opts.fsfs_version = None
+
     self.srcdir = abs_srcdir
     self.builddir = abs_builddir
     self.logfile = logfile
     self.faillogfile = faillogfile
-    self.base_url = base_url
-    self.fs_type = fs_type
-    self.http_library = http_library
-    self.server_minor_version = server_minor_version
-    # If you change the below condition then change in
-    # ../subversion/tests/cmdline/svntest/main.py too.
-    if server_minor_version is not None:
-      if int(server_minor_version) not in range(3, 1+SVN_VER_MINOR):
-        sys.stderr.write("Test harness only supports server minor versions 3-%d\n"
-                         % SVN_VER_MINOR)
-        sys.exit(1)
-    self.verbose = verbose
-    self.cleanup = cleanup
-    self.enable_sasl = enable_sasl
-    self.parallel = parallel
-    self.fsfs_sharding = fsfs_sharding
-    self.fsfs_packing = fsfs_packing
-    if fsfs_packing is not None and fsfs_sharding is None:
-      raise Exception('--fsfs-packing requires --fsfs-sharding')
-    self.config_file = None
-    if config_file is not None:
-      self.config_file = os.path.abspath(config_file)
-    self.list_tests = list_tests
-    self.milestone_filter = milestone_filter
-    self.set_log_level = set_log_level
-    self.svn_bin = svn_bin
-    self.mode_filter = mode_filter
     self.log = None
-    self.ssl_cert = ssl_cert
-    self.http_proxy = http_proxy
-    self.http_proxy_username = http_proxy_username
-    self.http_proxy_password = http_proxy_password
-    self.httpd_version = httpd_version
-    self.exclusive_wc_locks = exclusive_wc_locks
-    self.memcached_server = memcached_server
+    self.opts = opts
+
     if not sys.stdout.isatty() or sys.platform == 'win32':
       TextColors.disable()
-    self.skip_c_tests = (not not skip_c_tests)
-    self.dump_load_cross_check = (not not dump_load_cross_check)
 
-    # Parse out the FSFS version number
-    if self.fs_type is not None and self.fs_type.startswith('fsfs-v'):
-      self.fsfs_version = int(self.fs_type[6:])
-      self.fs_type = 'fsfs'
-    else:
-      self.fsfs_version = None
+  def _init_c_tests(self):
+    cmdline = [None, None]   # Program name and source dir
+
+    if self.opts.config_file is not None:
+      cmdline.append('--config-file=' + self.opts.config_file)
+    elif self.opts.memcached_server is not None:
+      cmdline.append('--memcached-server=' + self.opts.memcached_server)
+
+    if self.opts.url is not None:
+      subdir = 'subversion/tests/cmdline/svn-test-work'
+      cmdline.append('--repos-url=%s' % self.opts.url +
+                        '/svn-test-work/repositories')
+      cmdline.append('--repos-dir=%s'
+                     % os.path.abspath(
+                         os.path.join(self.builddir,
+                                      subdir, 'repositories')))
+
+      # Enable access for http
+      if self.opts.url.startswith('http'):
+        authzparent = os.path.join(self.builddir, subdir)
+        if not os.path.exists(authzparent):
+          os.makedirs(authzparent);
+        open(os.path.join(authzparent, 'authz'), 'w').write('[/]\n'
+                                                            '* = rw\n')
+
+    # ### Support --repos-template
+    if self.opts.list_tests is not None:
+      cmdline.append('--list')
+    if self.opts.verbose is not None:
+      cmdline.append('--verbose')
+    if self.opts.cleanup is not None:
+      cmdline.append('--cleanup')
+    if self.opts.fs_type is not None:
+      cmdline.append('--fs-type=%s' % self.opts.fs_type)
+    if self.opts.fsfs_version is not None:
+      cmdline.append('--fsfs-version=%d' % self.opts.fsfs_version)
+    if self.opts.server_minor_version is not None:
+      cmdline.append('--server-minor-version=' +
+                     self.opts.server_minor_version)
+    if self.opts.mode_filter is not None:
+      cmdline.append('--mode-filter=' + self.opts.mode_filter)
+    if self.opts.parallel is not None:
+      cmdline.append('--parallel')
+
+    self.c_test_cmdline = cmdline
+
+
+  def _init_py_tests(self, basedir):
+    cmdline = ['--srcdir=%s' % self.srcdir]
+    if self.opts.list_tests is not None:
+      cmdline.append('--list')
+    if self.opts.verbose is not None:
+      cmdline.append('--verbose')
+    if self.opts.cleanup is not None:
+      cmdline.append('--cleanup')
+    if self.opts.parallel is not None:
+      if self.opts.parallel == 1:
+        cmdline.append('--parallel')
+      else:
+        cmdline.append('--parallel-instances=%d' % self.opts.parallel)
+    if self.opts.svn_bin is not None:
+      cmdline.append('--bin=%s', self.opts.svn_bin)
+    if self.opts.url is not None:
+      cmdline.append('--url=%s' % self.opts.url)
+    if self.opts.fs_type is not None:
+      cmdline.append('--fs-type=%s' % self.opts.fs_type)
+    if self.opts.http_library is not None:
+      cmdline.append('--http-library=%s' % self.opts.http_library)
+    if self.opts.fsfs_sharding is not None:
+      cmdline.append('--fsfs-sharding=%d' % self.opts.fsfs_sharding)
+    if self.opts.fsfs_packing is not None:
+      cmdline.append('--fsfs-packing')
+    if self.opts.fsfs_version is not None:
+      cmdline.append('--fsfs-version=%d' % self.opts.fsfs_version)
+    if self.opts.server_minor_version is not None:
+      cmdline.append('--server-minor-version=%d' % self.opts.server_minor_version)
+    if self.opts.dump_load_cross_check is not None:
+      cmdline.append('--dump-load-cross-check')
+    if self.opts.enable_sasl is not None:
+      cmdline.append('--enable-sasl')
+    if self.opts.config_file is not None:
+      cmdline.append('--config-file=%s' % self.opts.config_file)
+    if self.opts.milestone_filter is not None:
+      cmdline.append('--milestone-filter=%s' % self.opts.milestone_filter)
+    if self.opts.mode_filter is not None:
+      cmdline.append('--mode-filter=%s' % self.opts.mode_filter)
+    if self.opts.set_log_level is not None:
+      cmdline.append('--set-log-level=%s' % self.opts.set_log_level)
+    if self.opts.ssl_cert is not None:
+      cmdline.append('--ssl-cert=%s' % self.opts.ssl_cert)
+    if self.opts.http_proxy is not None:
+      cmdline.append('--http-proxy=%s' % self.opts.http_proxy)
+    if self.opts.http_proxy_username is not None:
+      cmdline.append('--http-proxy-username=%s' % self.opts.http_proxy_username)
+    if self.opts.http_proxy_password is not None:
+      cmdline.append('--http-proxy-password=%s' % self.opts.http_proxy_password)
+    if self.opts.httpd_version is not None:
+      cmdline.append('--httpd-version=%s' % self.opts.httpd_version)
+    if self.opts.exclusive_wc_locks is not None:
+      cmdline.append('--exclusive-wc-locks')
+    if self.opts.memcached_server is not None:
+      cmdline.append('--memcached-server=%s' % self.opts.memcached_server)
+
+    # The svntest module is very pedantic about the current working directory
+    old_cwd = os.getcwd()
+    try:
+      os.chdir(basedir)
+      sys.path.insert(0, os.path.abspath(os.path.join(self.srcdir, basedir)))
+
+      global svntest
+      __import__('svntest')
+      __import__('svntest.main')
+      __import__('svntest.testcase')
+      svntest = sys.modules['svntest']
+      svntest.main = sys.modules['svntest.main']
+      svntest.testcase = sys.modules['svntest.testcase']
+
+      if svntest.main.logger is None:
+        import logging
+        svntest.main.logger = logging.getLogger()
+      svntest.main.parse_options(cmdline, optparse.SUPPRESS_USAGE)
+
+      svntest.testcase.TextColors.disable()
+    finally:
+      os.chdir(old_cwd)
 
-  def run(self, list):
-    '''Run all test programs given in LIST. Print a summary of results, if
+  def run(self, testlist):
+    '''Run all test programs given in TESTLIST. Print a summary of results, if
        there is a log file. Return zero iff all test programs passed.'''
     self._open_log('w')
     failed = 0
 
-    # If asked to skip C tests, remove non-Python tests from the list
-    if self.skip_c_tests:
-      def is_py_test(prog):
-        progpath, nums = self._split_nums(prog)
-        return progpath.endswith('.py')
-      list = filter(is_py_test, list)
+    # Filter tests into Python and native groups and prepare arguments
+    # for each group. The resulting list will contain tuples of
+    # (program dir, program name, test numbers), where the test
+    # numbers may be None.
+
+    def split_nums(prog):
+      test_nums = []
+      if '#' in prog:
+        prog, test_nums = prog.split('#')
+        if test_nums:
+          test_nums = test_nums.split(',')
+      return prog, test_nums
+
+    py_basedir = set()
+    py_tests = []
+    c_tests = []
+
+    for prog in testlist:
+      progpath, testnums = split_nums(prog)
+      progdir, progbase = os.path.split(progpath)
+      if progpath.endswith('.py'):
+        py_basedir.add(progdir)
+        py_tests.append((progdir, progbase, testnums))
+      elif not self.opts.skip_c_tests:
+        c_tests.append((progdir, progbase, testnums))
+
+    # Initialize svntest.main.options for Python tests. Load the
+    # svntest.main module from the Python test path.
+    if len(py_tests):
+      if len(py_basedir) > 1:
+        sys.stderr.write('The test harness requires all Python tests'
+                         ' to be in the same directory.')
+        sys.exit(1)
+      self._init_py_tests(list(py_basedir)[0])
+      py_tests.sort(key=lambda x: x[1])
 
-    for cnt, prog in enumerate(list):
-      failed = self._run_test(prog, cnt, len(list)) or failed
+    # Create the common command line for C tests
+    if len(c_tests):
+      self._init_c_tests()
+      c_tests.sort(key=lambda x: x[1])
+
+    # Run the tests
+    testlist = c_tests + py_tests
+    testcount = len(testlist)
+    for count, testcase in enumerate(testlist):
+      failed = self._run_test(testcase, count, testcount) or failed
 
     if self.log is None:
       return failed
@@ -245,26 +357,26 @@ class TestHarness:
         sys.stdout.write('%s\n       [[%s'
                          % (x[:wip], x[wip + len(wimptag):]))
 
-    if self.list_tests:
+    if self.opts.list_tests:
       passed = [x for x in log_lines if x[8:13] == '     ']
     else:
       passed = [x for x in log_lines if x[:6] == 'PASS: ']
 
-    if self.list_tests:
+    if self.opts.list_tests:
       skipped = [x for x in log_lines if x[8:12] == 'SKIP']
     else:
       skipped = [x for x in log_lines if x[:6] == 'SKIP: ']
 
-    if skipped and not self.list_tests:
+    if skipped and not self.opts.list_tests:
       print('At least one test was SKIPPED, checking ' + self.logfile)
       for x in skipped:
         sys.stdout.write(x)
 
-    if self.list_tests:
+    if self.opts.list_tests:
       xfailed = [x for x in log_lines if x[8:13] == 'XFAIL']
     else:
       xfailed = [x for x in log_lines if x[:6] == 'XFAIL:']
-    if xfailed and not self.list_tests:
+    if xfailed and not self.opts.list_tests:
       print('At least one test XFAILED, checking ' + self.logfile)
       for x in xfailed:
         printxfail(x)
@@ -282,19 +394,19 @@ class TestHarness:
         sys.stdout.write(x)
 
     # Print summaries, from least interesting to most interesting.
-    if self.list_tests:
+    if self.opts.list_tests:
       print('Summary of test listing:')
     else:
       print('Summary of test results:')
     if passed:
-      if self.list_tests:
+      if self.opts.list_tests:
         print('  %d test%s are set to PASS'
               % (len(passed), 's'*min(len(passed) - 1, 1)))
       else:
         print('  %d test%s PASSED'
               % (len(passed), 's'*min(len(passed) - 1, 1)))
     if skipped:
-      if self.list_tests:
+      if self.opts.list_tests:
         print('  %d test%s are set as SKIP'
               % (len(skipped), 's'*min(len(skipped) - 1, 1)))
       else:
@@ -303,14 +415,14 @@ class TestHarness:
     if xfailed:
       passwimp = [x for x in xfailed if 0 <= x.find(wimptag)]
       if passwimp:
-        if self.list_tests:
+        if self.opts.list_tests:
           print('  %d test%s are set to XFAIL (%d WORK-IN-PROGRESS)'
                 % (len(xfailed), 's'*min(len(xfailed) - 1, 1), len(passwimp)))
         else:
           print('  %d test%s XFAILED (%d WORK-IN-PROGRESS)'
                 % (len(xfailed), 's'*min(len(xfailed) - 1, 1), len(passwimp)))
       else:
-        if self.list_tests:
+        if self.opts.list_tests:
           print('  %d test%s are set as XFAIL'
                 % (len(xfailed), 's'*min(len(xfailed) - 1, 1)))
         else:
@@ -370,63 +482,21 @@ class TestHarness:
       self.log.close()
       self.log = None
 
-  def _run_c_test(self, prog, test_nums, dot_count):
+  def _run_c_test(self, progabs, progdir, progbase, test_nums, dot_count):
     'Run a c test, escaping parameters as required.'
-    progdir, progbase = os.path.split(prog)
-
-    if self.list_tests and self.milestone_filter:
+    if self.opts.list_tests and self.opts.milestone_filter:
       print 'WARNING: --milestone-filter option does not currently work with C tests'
 
     if not os.access(progbase, os.X_OK):
       print("\nNot an executable file: " + progbase)
       sys.exit(1)
 
-    progname = './' + progbase
-    cmdline = [progname,
-               '--srcdir=' + os.path.join(self.srcdir, progdir)]
-    if self.config_file is not None:
-      cmdline.append('--config-file=' + self.config_file)
-
-    if self.base_url is not None:
-      subdir = 'subversion/tests/cmdline/svn-test-work'
-
-      cmdline.append('--repos-url=%s' % self.base_url +
-                        '/svn-test-work/repositories')
-      cmdline.append('--repos-dir=%s'
-                     % os.path.abspath(
-                         os.path.join(self.builddir, subdir, 'repositories')))
-
-      # Enable access for http
-      if self.base_url.startswith('http'):
-        authzparent = os.path.join(self.builddir, subdir)
-        if not os.path.exists(authzparent):
-          os.makedirs(authzparent);
-        open(os.path.join(authzparent, 'authz'), 'w').write('[/]\n'
-                                                            '* = rw\n')
-
-    # ### Support --repos-template
-    if self.verbose is not None:
-      cmdline.append('--verbose')
-    if self.cleanup is not None:
-      cmdline.append('--cleanup')
-    if self.fs_type is not None:
-      cmdline.append('--fs-type=' + self.fs_type)
-    if self.fsfs_version is not None:
-      cmdline.append('--fsfs-version=%d' % self.fsfs_version)
-    if self.server_minor_version is not None:
-      cmdline.append('--server-minor-version=' + self.server_minor_version)
-    if self.list_tests is not None:
-      cmdline.append('--list')
-    if self.mode_filter is not None:
-      cmdline.append('--mode-filter=' + self.mode_filter)
-    if self.parallel is not None:
-      cmdline.append('--parallel')
+    cmdline = self.c_test_cmdline[:]
+    cmdline[0] = './' + progbase
+    cmdline[1] = '--srcdir=%s' % os.path.join(self.srcdir, progdir)
 
     if test_nums:
-      test_nums = test_nums.split(',')
       cmdline.extend(test_nums)
-
-    if test_nums:
       total = len(test_nums)
     else:
       total_cmdline = [cmdline[0], '--list']
@@ -474,90 +544,16 @@ class TestHarness:
     prog.wait()
     return prog.returncode
 
-  def _run_py_test(self, prog, test_nums, dot_count):
+  def _run_py_test(self, progabs, progdir, progbase, test_nums, dot_count):
     'Run a python test, passing parameters as needed.'
-    progdir, progbase = os.path.split(prog)
-
-    old_path = sys.path[:]
-    sys.path = [progdir] + sys.path
-
     try:
-      prog_mod = imp.load_module(progbase[:-3], open(prog, 'r'), prog,
+      prog_mod = imp.load_module(progbase[:-3], open(progabs, 'r'), progabs,
                                  ('.py', 'U', imp.PY_SOURCE))
     except:
       print("\nError loading test (details in following traceback): " + progbase)
       traceback.print_exc()
       sys.exit(1)
 
-    import svntest.main
-
-    # set up our options
-    svntest.main.create_default_options()
-    if self.base_url is not None:
-      svntest.main.options.test_area_url = self.base_url
-    if self.enable_sasl is not None:
-      svntest.main.options.enable_sasl = True
-    if self.parallel is not None:
-      try:
-        num_parallel = int(self.parallel)
-      except exceptions.ValueError:
-        num_parallel = svntest.main.default_num_threads
-      if num_parallel > 1:
-        svntest.main.options.parallel = num_parallel
-      else:
-        svntest.main.options.parallel = svntest.main.default_num_threads
-    if self.config_file is not None:
-      svntest.main.options.config_file = self.config_file
-    if self.verbose is not None:
-      svntest.main.options.verbose = True
-    if self.cleanup is not None:
-      svntest.main.options.cleanup = True
-    if self.fs_type is not None:
-      svntest.main.options.fs_type = self.fs_type
-    if self.fsfs_version is not None:
-      svntest.main.options.fsfs_version = self.fsfs_version
-    if self.http_library is not None:
-      svntest.main.options.http_library = self.http_library
-    if self.server_minor_version is not None:
-      svntest.main.options.server_minor_version = int(self.server_minor_version)
-    if self.list_tests is not None:
-      svntest.main.options.list_tests = True
-    if self.milestone_filter is not None:
-      svntest.main.options.milestone_filter = self.milestone_filter
-    if self.set_log_level is not None:
-      # Somehow the logger is not setup correctly from win-tests.py, so
-      # setting the log level would fail. ### Please fix
-      if svntest.main.logger is None:
-        import logging
-        svntest.main.logger = logging.getLogger()
-      svntest.main.logger.setLevel(self.set_log_level)
-    if self.svn_bin is not None:
-      svntest.main.options.svn_bin = self.svn_bin
-    if self.fsfs_sharding is not None:
-      svntest.main.options.fsfs_sharding = int(self.fsfs_sharding)
-    if self.fsfs_packing is not None:
-      svntest.main.options.fsfs_packing = self.fsfs_packing
-    if self.mode_filter is not None:
-      svntest.main.options.mode_filter = self.mode_filter
-    if self.ssl_cert is not None:
-      svntest.main.options.ssl_cert = self.ssl_cert
-    if self.http_proxy is not None:
-      svntest.main.options.http_proxy = self.http_proxy
-    if self.http_proxy_username is not None:
-          svntest.main.options.http_proxy_username = self.http_proxy_username
-    if self.http_proxy_password is not None:
-        svntest.main.options.http_proxy_password = self.http_proxy_password
-    if self.httpd_version is not None:
-        svntest.main.options.httpd_version = self.httpd_version
-    if self.exclusive_wc_locks is not None:
-      svntest.main.options.exclusive_wc_locks = self.exclusive_wc_locks
-    if self.memcached_server is not None:
-      svntest.main.options.memcached_server = self.memcached_server
-    if self.dump_load_cross_check is not None:
-      svntest.main.options.dump_load_cross_check = self.dump_load_cross_check
-
-    svntest.main.options.srcdir = self.srcdir
-
     # setup the output pipes
     if self.log:
       sys.stdout.flush()
@@ -589,31 +585,23 @@ class TestHarness:
     serial_only = hasattr(prog_mod, 'serial_only') and prog_mod.serial_only
 
     # run the tests
-    svntest.testcase.TextColors.disable()
-
-    if self.list_tests:
+    if self.opts.list_tests:
       prog_f = None
     else:
       prog_f = progress_func
 
-    if test_nums:
-      test_selection = [test_nums]
-    else:
-      test_selection = []
-
     try:
       failed = svntest.main.execute_tests(prog_mod.test_list,
                                           serial_only=serial_only,
                                           test_name=progbase,
                                           progress_func=prog_f,
-                                          test_selection=test_selection)
+                                          test_selection=test_nums)
     except svntest.Failure:
       if self.log:
         os.write(old_stdout, '.' * dot_count)
       failed = True
 
     # restore some values
-    sys.path = old_path
     if self.log:
       sys.stdout.flush()
       sys.stderr.flush()
@@ -624,13 +612,7 @@ class TestHarness:
 
     return failed
 
-  def _split_nums(self, prog):
-    test_nums = None
-    if '#' in prog:
-      prog, test_nums = prog.split('#')
-    return prog, test_nums
-
-  def _run_test(self, prog, test_nr, total_tests):
+  def _run_test(self, testcase, test_nr, total_tests):
     "Run a single test. Return the test's exit code."
 
     if self.log:
@@ -638,13 +620,12 @@ class TestHarness:
     else:
       log = sys.stdout
 
-    prog, test_nums = self._split_nums(prog)
-    progdir, progbase = os.path.split(prog)
+    progdir, progbase, test_nums = testcase
     if self.log:
       # Using write here because we don't want even a trailing space
       test_info = '[%s/%d] %s' % (str(test_nr + 1).zfill(len(str(total_tests))),
                                   total_tests, progbase)
-      if self.list_tests:
+      if self.opts.list_tests:
         sys.stdout.write('Listing tests in %s' % (test_info, ))
       else:
         sys.stdout.write('%s' % (test_info, ))
@@ -653,7 +634,7 @@ class TestHarness:
       # ### Hack for --log-to-stdout to work (but not print any dots).
       test_info = ''
 
-    if self.list_tests:
+    if self.opts.list_tests:
       log.write('LISTING: %s\n' % progbase)
     else:
       log.write('START: %s\n' % progbase)
@@ -662,7 +643,7 @@ class TestHarness:
 
     start_time = datetime.now()
 
-    progabs = os.path.abspath(os.path.join(self.srcdir, prog))
+    progabs = os.path.abspath(os.path.join(self.srcdir, progdir, progbase))
     old_cwd = os.getcwd()
     line_length = _get_term_width()
     dots_needed = line_length \
@@ -671,9 +652,10 @@ class TestHarness:
     try:
       os.chdir(progdir)
       if progbase[-3:] == '.py':
-        failed = self._run_py_test(progabs, test_nums, dots_needed)
+        testcase = self._run_py_test
       else:
-        failed = self._run_c_test(prog, test_nums, dots_needed)
+        testcase = self._run_c_test
+      failed = testcase(progabs, progdir, progbase, test_nums, dots_needed)
     except:
       os.chdir(old_cwd)
       raise
@@ -691,7 +673,7 @@ class TestHarness:
       else:
         log.write('FAIL:  %s: Unknown test failure.\n' % progbase)
 
-    if not self.list_tests:
+    if not self.opts.list_tests:
       # Log the elapsed time.
       elapsed_time = str(datetime.now() - start_time)
       log.write('END: %s\n' % progbase)
@@ -702,7 +684,7 @@ class TestHarness:
     # If we are only listing the tests just add a newline, otherwise if
     # we printed a "Running all tests in ..." line, add the test result.
     if self.log:
-      if self.list_tests:
+      if self.opts.list_tests:
         print ''
       else:
         if failed:
@@ -713,113 +695,84 @@ class TestHarness:
     return failed
 
 
+def create_parser():
+  parser = optparse.OptionParser(usage=__doc__);
+
+  parser.add_option('-l', '--list', action='store_true', dest='list_tests',
+                    help='Print test doc strings instead of running them')
+  parser.add_option('-v', '--verbose', action='store_true',
+                    help='Print binary command-lines')
+  parser.add_option('-c', '--cleanup', action='store_true',
+                    help='Clean up after successful tests')
+  parser.add_option('-p', '--parallel', action='store', type='int',
+                    help='Run the tests in parallel')
+  parser.add_option('-u', '--url', action='store',
+                    help='Base url to the repos (e.g. svn://localhost)')
+  parser.add_option('-f', '--fs-type', action='store',
+                    help='Subversion file system type (fsfs(-v[46]), bdb or fsx)')
+  parser.add_option('--http-library', action='store',
+                    help="Make svn use this DAV library (neon or serf)")
+  parser.add_option('--bin', action='store', dest='svn_bin',
+                    help='Use the svn binaries installed in this path')
+  parser.add_option('--fsfs-sharding', action='store', type='int',
+                    help='Default shard size (for fsfs)')
+  parser.add_option('--fsfs-packing', action='store_true',
+                    help="Run 'svnadmin pack' automatically")
+  parser.add_option('--server-minor-version', type='int', action='store',
+                    help="Set the minor version for the server")
+  parser.add_option('--skip-c-tests', '--skip-C-tests', action='store_true',
+                    help="Run only the Python tests")
+  parser.add_option('--dump-load-cross-check', action='store_true',
+                    help="After every test, run a series of dump and load " +
+                         "tests with svnadmin, svnrdump and svndumpfilter " +
+                         " on the testcase repositories to cross-check " +
+                         " dump file compatibility.")
+  parser.add_option('--enable-sasl', action='store_true',
+                    help='Whether to enable SASL authentication')
+  parser.add_option('--config-file', action='store',
+                    help="Configuration file for tests.")
+  parser.add_option('--log-to-stdout', action='store_true',
+                    help='Print test progress to stdout instead of a log file')
+  parser.add_option('--milestone-filter', action='store', dest='milestone_filter',
+                    help='Limit --list to those with target milestone specified')
+  parser.add_option('--mode-filter', action='store', dest='mode_filter',
+                    default='ALL',
+                    help='Limit tests to those with type specified (e.g. XFAIL)')
+  parser.add_option('--set-log-level', action='store',
+                    help="Set log level (numerically or symbolically). " +
+                         "Symbolic levels are: CRITICAL, ERROR, WARNING, " +
+                         "INFO, DEBUG")
+  parser.add_option('--ssl-cert', action='store',
+                    help='Path to SSL server certificate.')
+  parser.add_option('--http-proxy', action='store',
+                    help='Use the HTTP Proxy at hostname:port.')
+  parser.add_option('--http-proxy-username', action='store',
+                    help='Username for the HTTP Proxy.')
+  parser.add_option('--http-proxy-password', action='store',
+                    help='Password for the HTTP Proxy.')
+  parser.add_option('--httpd-version', action='store',
+                    help='Assume HTTPD is this version.')
+  parser.add_option('--exclusive-wc-locks', action='store_true',
+                    help='Use sqlite exclusive locking for working copies')
+  parser.add_option('--memcached-server', action='store',
+                    help='Use memcached server at specified URL (FSFS only)')
+  return parser
+
 def main():
-  try:
-    opts, args = my_getopt(sys.argv[1:], 'u:f:vc',
-                           ['url=', 'fs-type=', 'verbose', 'cleanup',
-                            'skip-c-tests', 'skip-C-tests',
-                            'dump-load-cross-check',
-                            'http-library=', 'server-minor-version=',
-                            'fsfs-packing', 'fsfs-sharding=',
-                            'enable-sasl', 'parallel=', 'config-file=',
-                            'log-to-stdout', 'list', 'milestone-filter=',
-                            'mode-filter=', 'set-log-level=', 'ssl-cert=',
-                            'http-proxy=', 'http-proxy-username=',
-                            'http-proxy-password=', 'httpd-version=',
-                            'exclusive-wc-locks',
-                            'memcached-server='])
-  except getopt.GetoptError:
-    args = []
+  (opts, args) = create_parser().parse_args(sys.argv[1:])
 
   if len(args) < 3:
     print(__doc__)
     sys.exit(2)
 
-  base_url, fs_type, verbose, cleanup, skip_c_tests, enable_sasl, \
-    http_library, server_minor_version, fsfs_sharding, fsfs_packing, \
-    parallel, config_file, log_to_stdout, list_tests, mode_filter, \
-    milestone_filter, set_log_level, ssl_cert, http_proxy, \
-    http_proxy_username, http_proxy_password, httpd_version, \
-    exclusive_wc_locks, memcached_server, dump_load_cross_check = \
-            None, None, None, None, None, None, None, None, None, None, \
-            None, None, None, None, None, None, None, None, None, None, \
-            None, None, None, None, None
-  for opt, val in opts:
-    if opt in ['-u', '--url']:
-      base_url = val
-    elif opt in ['-f', '--fs-type']:
-      fs_type = val
-    elif opt in ['--http-library']:
-      http_library = val
-    elif opt in ['--fsfs-sharding']:
-      fsfs_sharding = int(val)
-    elif opt in ['--fsfs-packing']:
-      fsfs_packing = 1
-    elif opt in ['--server-minor-version']:
-      server_minor_version = val
-    elif opt in ['-v', '--verbose']:
-      verbose = 1
-    elif opt in ['-c', '--cleanup']:
-      cleanup = 1
-    elif opt in ['--skip-c-tests', '--skip-C-tests']:
-      skip_c_tests = 1
-    elif opt in ['--dump-load-cross-check']:
-      dump_load_cross_check = 1
-    elif opt in ['--enable-sasl']:
-      enable_sasl = 1
-    elif opt in ['--parallel']:
-      parallel = val
-    elif opt in ['--config-file']:
-      config_file = val
-    elif opt in ['--log-to-stdout']:
-      log_to_stdout = 1
-    elif opt in ['--list']:
-      list_tests = 1
-    elif opt in ['--milestone-filter']:
-      milestone_filter = val
-    elif opt in ['--mode-filter']:
-      mode_filter = val
-    elif opt in ['--set-log-level']:
-      set_log_level = val
-    elif opt in ['--ssl-cert']:
-      ssl_cert = val
-    elif opt in ['--http-proxy']:
-      http_proxy = val
-    elif opt in ['--http-proxy-username']:
-      http_proxy_username = val
-    elif opt in ['--http-proxy-password']:
-      http_proxy_password = val
-    elif opt in ['--httpd-version']:
-      httpd_version = val
-    elif opt in ['--exclusive-wc-locks']:
-      exclusive_wc_locks = 1
-    elif opt in ['--memcached-server']:
-      memcached_server = val
-    else:
-      raise getopt.GetoptError
-
-  if log_to_stdout:
+  if opts.log_to_stdout:
     logfile = None
     faillogfile = None
   else:
     logfile = os.path.abspath('tests.log')
     faillogfile = os.path.abspath('fails.log')
 
-  th = TestHarness(args[0], args[1], logfile, faillogfile,
-                   base_url, fs_type, http_library, server_minor_version,
-                   verbose, cleanup, enable_sasl, parallel, config_file,
-                   fsfs_sharding, fsfs_packing, list_tests,
-                   mode_filter=mode_filter, milestone_filter=milestone_filter,
-                   set_log_level=set_log_level, ssl_cert=ssl_cert,
-                   http_proxy=http_proxy,
-                   http_proxy_username=http_proxy_username,
-                   http_proxy_password=http_proxy_password,
-                   httpd_version=httpd_version,
-                   exclusive_wc_locks=exclusive_wc_locks,
-                   memcached_server=memcached_server,
-                   skip_c_tests=skip_c_tests,
-                   dump_load_cross_check=dump_load_cross_check)
-
+  th = TestHarness(args[0], args[1], logfile, faillogfile, opts)
   failed = th.run(args[2:])
   if failed:
     sys.exit(1)

Modified: subversion/branches/1.9.x-r1700215/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1700215/subversion/tests/cmdline/svntest/main.py?rev=1701367&r1=1701366&r2=1701367&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1700215/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/1.9.x-r1700215/subversion/tests/cmdline/svntest/main.py Sat Sep  5 10:14:38 2015
@@ -1883,13 +1883,7 @@ def _internal_run_tests(test_list, testn
   return exit_code
 
 
-def create_default_options():
-  """Set the global options to the defaults, as provided by the argument
-     parser."""
-  _parse_options([])
-
-
-def _create_parser():
+def _create_parser(usage=None):
   """Return a parser for our test suite."""
   def set_log_level(option, opt, value, parser, level=None):
     if level:
@@ -1899,9 +1893,18 @@ def _create_parser():
       # called from --set-log-level
       logger.setLevel(getattr(logging, value, None) or int(value))
 
-  # set up the parser
+  # Set up the parser.
+  # If you add new options, consider adding them in
+  #
+  #     .../build/run_tests.py:main()
+  #
+  # and handling them in
+  #
+  #     .../build/run_tests.py:TestHarness._init_py_tests()
+  #
   _default_http_library = 'serf'
-  usage = 'usage: %prog [options] [<test> ...]'
+  if usage is None:
+    usage = 'usage: %prog [options] [<test> ...]'
   parser = optparse.OptionParser(usage=usage)
   parser.add_option('-l', '--list', action='store_true', dest='list_tests',
                     help='Print test doc strings instead of running them')
@@ -1916,6 +1919,9 @@ def _create_parser():
   parser.add_option('-p', '--parallel', action='store_const',
                     const=default_num_threads, dest='parallel',
                     help='Run the tests in parallel')
+  parser.add_option('--parallel-instances', action='store',
+                    type='int', dest='parallel',
+                    help='Run the given number of tests in parallel')
   parser.add_option('-c', action='store_true', dest='is_child_process',
                     help='Flag if we are running this python test as a ' +
                          'child process')
@@ -2001,31 +2007,30 @@ def _create_parser():
   return parser
 
 
-def _parse_options(arglist=sys.argv[1:]):
+def parse_options(arglist=sys.argv[1:], usage=None):
   """Parse the arguments in arg_list, and set the global options object with
      the results"""
 
   global options
 
-  parser = _create_parser()
+  parser = _create_parser(usage)
   (options, args) = parser.parse_args(arglist)
 
-  # some sanity checking
+  # Normalize url to have no trailing slash
+  if options.url:
+    if options.url[-1:] == '/':
+      options.test_area_url = options.url[:-1]
+    else:
+      options.test_area_url = options.url
+
+  # Some sanity checking
   if options.fsfs_packing and not options.fsfs_sharding:
     parser.error("--fsfs-packing requires --fsfs-sharding")
 
-  # If you change the below condition then change
-  # ../../../../build/run_tests.py too.
   if options.server_minor_version not in range(3, SVN_VER_MINOR+1):
     parser.error("test harness only supports server minor versions 3-%d"
                  % SVN_VER_MINOR)
 
-  if options.url:
-    if options.url[-1:] == '/': # Normalize url to have no trailing slash
-      options.test_area_url = options.url[:-1]
-    else:
-      options.test_area_url = options.url
-
   # Make sure the server-minor-version matches the fsfs-version parameter.
   if options.fsfs_version:
     if options.fsfs_version == 6:
@@ -2174,7 +2179,7 @@ def execute_tests(test_list, serial_only
 
   if not options:
     # Override which tests to run from the commandline
-    (parser, args) = _parse_options()
+    (parser, args) = parse_options()
     test_selection = args
   else:
     parser = _create_parser()
@@ -2324,25 +2329,29 @@ def execute_tests(test_list, serial_only
     # We are simply listing the tests so always exit with success.
     return 0
 
-  # don't run tests in parallel when the tests don't support it or there
-  # are only a few tests to run.
+  # don't run tests in parallel when the tests don't support it or
+  # there are only a few tests to run.
+  options_parallel = options.parallel
   if serial_only or len(testnums) < 2:
     options.parallel = 0
 
-  if not options.is_child_process:
-    # Build out the default configuration directory
-    create_config_dir(default_config_dir,
-                      ssl_cert=options.ssl_cert,
-                      ssl_url=options.test_area_url,
-                      http_proxy=options.http_proxy,
-                      exclusive_wc_locks=options.exclusive_wc_locks)
-
-    # Setup the pristine repository
-    svntest.actions.setup_pristine_greek_repository()
-
-  # Run the tests.
-  exit_code = _internal_run_tests(test_list, testnums, options.parallel,
-                                  options.srcdir, progress_func)
+  try:
+    if not options.is_child_process:
+      # Build out the default configuration directory
+      create_config_dir(default_config_dir,
+                        ssl_cert=options.ssl_cert,
+                        ssl_url=options.test_area_url,
+                        http_proxy=options.http_proxy,
+                        exclusive_wc_locks=options.exclusive_wc_locks)
+
+      # Setup the pristine repository
+      svntest.actions.setup_pristine_greek_repository()
+
+    # Run the tests.
+    exit_code = _internal_run_tests(test_list, testnums, options.parallel,
+                                    options.srcdir, progress_func)
+  finally:
+    options.parallel = options_parallel
 
   # Remove all scratchwork: the 'pristine' repository, greek tree, etc.
   # This ensures that an 'import' will happen the next time we run.

Modified: subversion/branches/1.9.x-r1700215/win-tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1700215/win-tests.py?rev=1701367&r1=1701366&r2=1701367&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1700215/win-tests.py (original)
+++ subversion/branches/1.9.x-r1700215/win-tests.py Sat Sep  5 10:14:38 2015
@@ -917,17 +917,29 @@ if not test_javahl and not test_swig:
     httpd_version = gen_obj._libraries['httpd'].version
   else:
     httpd_version = None
+
+  opts, args = run_tests.create_parser().parse_args([])
+  opts.url = base_url
+  opts.fs_type = fs_type
+  opts.http_library = 'serf'
+  opts.server_minor_version = server_minor_version
+  opts.verbose = not quiet
+  opts.cleanup = cleanup
+  opts.enable_sasl = enable_sasl
+  opts.parallel = parallel
+  opts.config_file = config_file
+  opts.fsfs_sharding = fsfs_sharding
+  opts.fsfs_packing = fsfs_packing
+  opts.list_tests = list_tests
+  opts.svn_bin = svn_bin
+  opts.mode_filter = mode_filter
+  opts.milestone_filter = milestone_filter
+  opts.httpd_version = httpd_version
+  opts.set_log_level = log_level
+  opts.ssl_cert = ssl_cert
+  opts.exclusive_wc_locks = exclusive_wc_locks
   th = run_tests.TestHarness(abs_srcdir, abs_builddir,
-                             log_file,
-                             fail_log_file,
-                             base_url, fs_type, 'serf',
-                             server_minor_version, not quiet,
-                             cleanup, enable_sasl, parallel, config_file,
-                             fsfs_sharding, fsfs_packing,
-                             list_tests, svn_bin, mode_filter,
-                             milestone_filter,
-                             httpd_version=httpd_version,
-                             set_log_level=log_level, ssl_cert=ssl_cert)
+                             log_file, fail_log_file, opts)
   old_cwd = os.getcwd()
   try:
     os.chdir(abs_builddir)