[Lldb-commits] [lldb] r204018 - Inform users when *not* running dosep.ty multithreaded.

Steve Pucci spucci at google.com
Sun Mar 16 11:23:59 PDT 2014


Author: spucci
Date: Sun Mar 16 13:23:59 2014
New Revision: 204018

URL: http://llvm.org/viewvc/llvm-project?rev=204018&view=rev
Log:
Inform users when *not* running dosep.ty multithreaded.

The gain with multithreading is large, but turning it on requires
an environment variable and so is hard for users to discover.  This
gives users a way to discover the feature by printing out a message
when the environment variable is not set.


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=204018&r1=204017&r2=204018&view=diff
==============================================================================
--- lldb/trunk/test/dosep.ty (original)
+++ lldb/trunk/test/dosep.ty Sun Mar 16 13:23:59 2014
@@ -12,6 +12,8 @@ from optparse import OptionParser
 # Command template of the invocation of the test driver.
 template = '%s/dotest.py %s -p %s %s'
 
+multithreaded_envar = 'LLDB_TEST_THREADS'
+
 def process_dir(root, files, test_root, dotest_options):
     """Examine a directory for tests, and invoke any found within it."""
     failed = []
@@ -54,7 +56,7 @@ def walk_and_invoke(test_root, dotest_op
     failed = []
     passed = []
     if (num_threads > 1):
-        print "Running multithreaded with " + str(num_threads) + " threads."
+        print "Running multithreaded with " + str(num_threads) + " threads (from " + multithreaded_envar + ")"
         global in_q
         global out_q
         in_q = Queue.Queue()
@@ -63,6 +65,8 @@ def walk_and_invoke(test_root, dotest_op
             t = threading.Thread(target=process_dir_worker)
             t.daemon = True
             t.start()
+    else:
+        print "NOT running multithreaded.  Consider setting " + multithreaded_envar + " environment variable."
     for root, dirs, files in os.walk(test_root, topdown=False):
         if (num_threads > 1):
             in_q.put((root, files, test_root, dotest_options))





More information about the lldb-commits mailing list