Index: build/run_tests.py =================================================================== --- build/run_tests.py (revision 22227) +++ build/run_tests.py (working copy) @@ -4,12 +4,12 @@ # '''usage: python run_tests.py [--url=] [--fs-type=] - [--verbose] [--cleanup] [--enable-sasl] + [--verbose] [--cleanup] [--enable-sasl] [--parallel] -The optional base-url, fs-type, verbose, and cleanup options, and -the first two parameters are passed unchanged to the TestHarness +The optional base-url, fs-type, verbose, cleanup and parallel options, +and the first two parameters are passed unchanged to the TestHarness constructor. All other parameters are names of test programs. ''' @@ -27,7 +27,7 @@ def __init__(self, abs_srcdir, abs_builddir, logfile, base_url=None, fs_type=None, verbose=None, cleanup=None, - enable_sasl=None): + enable_sasl=None, parallel=None): '''Construct a TestHarness instance. ABS_SRCDIR and ABS_BUILDDIR are the source and build directories. @@ -43,6 +43,7 @@ self.verbose = verbose self.cleanup = cleanup self.enable_sasl = enable_sasl + self.parallel = parallel self.log = None def run(self, list): @@ -114,6 +115,8 @@ cmdline.append('--cleanup') if self.fs_type is not None: cmdline.append(quote('--fs-type=' + self.fs_type)) + if self.parallel is not None: + cmdline.append('--parallel') old_cwd = os.getcwd() try: @@ -165,9 +168,9 @@ def main(): try: - opts, args = my_getopt(sys.argv[1:], 'u:f:vc', + opts, args = my_getopt(sys.argv[1:], 'u:f:vcp', ['url=', 'fs-type=', 'verbose', 'cleanup', - 'enable-sasl']) + 'enable-sasl', 'parallel']) except getopt.GetoptError: args = [] @@ -175,8 +178,8 @@ print __doc__ sys.exit(2) - base_url, fs_type, verbose, cleanup, enable_sasl = None, None, None, None, \ - None + base_url, fs_type, verbose, cleanup, enable_sasl, parallel = None, None, None, \ + None, None, None for opt, val in opts: if opt in ('-u', '--url'): base_url = val @@ -188,12 +191,14 @@ cleanup = 1 elif opt in ('--enable-sasl'): enable_sasl = 1 + elif opt in ('-p', '--parallel'): + parallel = 1 else: raise getopt.GetoptError th = TestHarness(args[0], args[1], os.path.abspath('tests.log'), - base_url, fs_type, verbose, cleanup, enable_sasl) + base_url, fs_type, verbose, cleanup, enable_sasl, parallel) failed = th.run(args[2:]) if failed: Index: Makefile.in =================================================================== --- Makefile.in (revision 22227) +++ Makefile.in (working copy) @@ -368,6 +368,9 @@ if test "$(ENABLE_SASL)" != ""; then \ flags="--enable-sasl $$flags"; \ fi; \ + if test "$(PARALLEL)" != ""; then \ + flags="--parallel $$flags"; \ + fi; \ $(PYTHON) $(top_srcdir)/build/run_tests.py $$flags \ '$(abs_srcdir)' '$(abs_builddir)' $(TESTS); \ else \