<div dir="ltr"><div>Hi all,</div><div><br></div><div>This patch provides support for running the dosep.ty test driver with multiple threads. It speeds up running the full test suite on my HP z620 Ubuntu machine with 32 hyperthreaded CPUs from 11 minutes to about 1m13s (about 9x).</div>
<div><br></div><div>The default behavior is to run single-threaded as before. If the environment variable LLDB_TEST_THREADS is set, a Python work queue is set up with that many worker threads.</div><div><br></div><div>To avoid collisions within a test directory where multiple tests make use of the same prebuilt executable, the unit of work for the worker threads is a single directory (that is, all tests within a directory are processed in the normal serial way by a single thread).</div>
<div><br></div><div>I've run this way a number of times; the only issue I found was that the TestProcessAttach.py test failed once, when attempting to attach to the process "a.out" by name. I assume this is because some other thread was running an executable of that name at the same time, and we were attempting to attach to the wrong one, so I changed that test to use a different executable name (that change is also included in the attached patch).</div>
<div><br></div><div>There is actually an opportunity to speed the overall test time further (maybe as much as another 1.5x or so) by dividing up a few long-running tests into multiple directories, but I'm not planning to do that now.</div>
<div><br></div><div>This doesn't yet work with ninja makes, but tfiala or I will look at that as well.</div><div><br></div><div> - Steve</div></div>