<div dir="ltr">I've got a patch locally to make all of our Python stuff part of an lldb package called `lldbsuite`.  Currently we've got a bunch of standalone scripts that live in various directories such as `lldb/test`, or `lldb/scripts`, and possibly some  other locations, and this organization makes it hard to share code because it is incompatible with Python's built-in code reuse mechanism, which is its package system.<div><br></div><div>The problem is, this patch is *big*.  Functionally there weren't many major changes, but it renames the entire test directory.  To be clear, it still leaves `test/dotest.py` in place, so nobody has to change their workflow or do anything differently.  If you used to write "cd test && dotest.py" you can still do that.  dotest.py is now just a 2 line wrapper around the package, so it looks like:</div><div><br></div><div>import lldbsuite.test</div><div>lldbsuite.test.run_suite()</div><div><br></div><div>the advantage of this method is that lldbsuite can contain subpackages.  It already contains one subpackage, which is lldbsuite.test, and I plan to move some of the Python code in `lldb/scripts` there as well, so that we have lldbsuite.scripts.  Then we can add a third submodule, lldbsuite.shared, and now dotest can share code with scripts, and it gives us a nice place to put stuff that previously had been copied all around.</div><div><br></div><div>It also gives us a nice way to perform module-wide initialization that we don't have to repeat in every single test, such as writing "import lldb_shared" at the top of every file, since that can be done as part of lldbsuite/__init__.py.</div><div><br></div><div><br></div><div>In any case, I have this all working on my machine, but I would like to see if someone can try my patch out on other platforms.  The size of the patch presents a problem though - it's over 7MB since it renames a very large directory.</div><div><br></div><div>As usual, comments / concerns also welcome.</div></div>