lit: Show actually created count of threads. The incorrect threads count is printed...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 17 Aug 2012 04:15:41 +0000 (04:15 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 17 Aug 2012 04:15:41 +0000 (04:15 +0000)
Thanks to Vinson Lee, reported in PR13620.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162078 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/lit/main.py

index 039868da78603a2d7efdfa997ee4467b00b5254b..25bbcbd9f275b6d11dc2704bf0cd723e0a0f446e 100755 (executable)
@@ -566,6 +566,9 @@ def main(builtinParameters = {}):    # Bump the GIL check interval, its more imp
     if opts.maxTests is not None:
         tests = tests[:opts.maxTests]
 
+    # Don't create more threads than tests.
+    opts.numThreads = min(len(tests), opts.numThreads)
+
     extra = ''
     if len(tests) != numTotalTests:
         extra = ' of %d' % numTotalTests
@@ -589,9 +592,6 @@ def main(builtinParameters = {}):    # Bump the GIL check interval, its more imp
         else:
             print header
 
-    # Don't create more threads than tests.
-    opts.numThreads = min(len(tests), opts.numThreads)
-
     startTime = time.time()
     display = TestingProgressDisplay(opts, len(tests), progressBar)
     provider = TestProvider(tests, opts.maxTime)