[llvm-commits] [llvm] r162078 - /llvm/trunk/utils/lit/lit/main.py

NAKAMURA Takumi geek4civic at gmail.com
Thu Aug 16 21:15:41 PDT 2012


Author: chapuni
Date: Thu Aug 16 23:15:41 2012
New Revision: 162078

URL: http://llvm.org/viewvc/llvm-project?rev=162078&view=rev
Log:
lit: Show actually created count of threads. The incorrect threads count is printed if the number of tests are less than the number of default threads.

Thanks to Vinson Lee, reported in PR13620.

Modified:
    llvm/trunk/utils/lit/lit/main.py

Modified: llvm/trunk/utils/lit/lit/main.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/main.py?rev=162078&r1=162077&r2=162078&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/main.py (original)
+++ llvm/trunk/utils/lit/lit/main.py Thu Aug 16 23:15:41 2012
@@ -566,6 +566,9 @@
     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 @@
         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)





More information about the llvm-commits mailing list