[lldb-dev] [PATCH] Emit message in test driver if not running multithreaded

Steve Pucci spucci at google.com
Thu Mar 13 15:21:52 PDT 2014


Sorry, ignore the part of the patch which removes
test/source_manager/main.c -- that's apparently an artifact of a test that
was running at the time I captured the patch.  The actual patch should
include only the change to dosep.ty.



On Thu, Mar 13, 2014 at 3:16 PM, Steve Pucci <spucci at google.com> wrote:

> Hi all,
>
> The gain in speed from running dosep.ty (the main lldb test driver) is
> large, but turning it on requires an environment variable and so is hard
> for users to discover.
>
> To let people know about it, I'd like to commit the attached patch which
> will print a message if the environment variable is unset (or is set to 1):
>
>         print "NOT running multithreaded.  Consider setting
> LLDB_TEST_THREADS environment variable."
>
> Thanks,
>    Steve
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140313/93247052/attachment.html>
-------------- next part --------------
Index: test/dosep.ty
===================================================================
--- test/dosep.ty	(revision 203849)
+++ test/dosep.ty	(working copy)
@@ -12,6 +12,8 @@
 # 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 @@
     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 @@
             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-dev mailing list