[llvm-commits] [PATCH] lit: Fix thread count in test output header.

Vinson Lee vlee at freedesktop.org
Tue Aug 14 10:21:12 PDT 2012


Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 utils/lit/lit/main.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/utils/lit/lit/main.py b/utils/lit/lit/main.py
index 039868d..25bbcbd 100755
--- a/utils/lit/lit/main.py
+++ b/utils/lit/lit/main.py
@@ -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)
-- 
1.7.9.5




More information about the llvm-commits mailing list