summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlldb/test/dosep.ty21
1 files changed, 15 insertions, 6 deletions
diff --git a/lldb/test/dosep.ty b/lldb/test/dosep.ty
index f44252c3ba4..56feffb88c9 100755
--- a/lldb/test/dosep.ty
+++ b/lldb/test/dosep.ty
@@ -6,6 +6,7 @@ Run the test suite using a separate process for each test file.
import os, sys, platform
import Queue, threading
+import multiprocessing
from optparse import OptionParser
@@ -93,15 +94,23 @@ Run lldb test suite using a separate process for each test file.
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)
OpenPOWER on IntegriCloud