[Lldb-commits] [lldb] r204681 - Add a "--threads N" option instead of having to use an environment variable. It also now defaults to running with the number of CPUs on the machine.
Greg Clayton
gclayton at apple.com
Mon Mar 24 16:01:57 PDT 2014
Author: gclayton
Date: Mon Mar 24 18:01:57 2014
New Revision: 204681
URL: http://llvm.org/viewvc/llvm-project?rev=204681&view=rev
Log:
Add a "--threads N" option instead of having to use an environment variable. It also now defaults to running with the number of CPUs on the machine.
Modified:
lldb/trunk/test/dosep.ty
Modified: lldb/trunk/test/dosep.ty
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.ty?rev=204681&r1=204680&r2=204681&view=diff
==============================================================================
--- lldb/trunk/test/dosep.ty (original)
+++ lldb/trunk/test/dosep.ty Mon Mar 24 18:01:57 2014
@@ -6,6 +6,7 @@ Run the test suite using a separate proc
import os, sys, platform
import Queue, threading
+import multiprocessing
from optparse import OptionParser
@@ -93,15 +94,23 @@ Run lldb test suite using a separate pro
dest='dotest_options',
help="""The options passed to 'dotest.py' if specified.""")
+ parser.add_option('-t', '--threads',
+ type='int',
+ dest='num_threads',
+ help="""The number of threads to use when running tests separately.""",
+ default=multiprocessing.cpu_count())
+
opts, args = parser.parse_args()
dotest_options = opts.dotest_options
- num_threads_str = os.environ.get("LLDB_TEST_THREADS")
- if num_threads_str:
- num_threads = int(num_threads_str)
- if num_threads < 1:
+ num_threads = opts.num_threads
+ if num_threads < 1:
+ num_threads_str = os.environ.get("LLDB_TEST_THREADS")
+ if num_threads_str:
+ num_threads = int(num_threads_str)
+ if num_threads < 1:
+ num_threads = 1
+ else:
num_threads = 1
- else:
- num_threads = 1
system_info = " ".join(platform.uname())
(failed, passed) = walk_and_invoke(test_root, dotest_options, num_threads)
More information about the lldb-commits
mailing list