This is an archive of the discontinued LLVM Phabricator instance.

Make dosep correctly invoke the top level script when doing the multiprocessing fork
ClosedPublic

Authored by zturner on Oct 28 2015, 1:49 PM.

Details

Summary

This patch disables the ability to run packages/Python/lldbsuite/test/dotest.py as a standalone script by explicitly erroring out if it detects that to be the case. Then, it fixes up the place where dosep exec's the script to actually exect the main script that we're running from, instead of hardcoding a path to dotest.py, which is now wrong in the presence of being imported as a package.

Diff Detail

Event Timeline

zturner updated this revision to Diff 38684.Oct 28 2015, 1:49 PM
zturner retitled this revision from to Make dosep correctly invoke the top level script when doing the multiprocessing fork.
zturner updated this object.
zturner added a reviewer: tfiala.
zturner added a subscriber: lldb-commits.
tfiala accepted this revision.Oct 28 2015, 8:31 PM
tfiala edited edge metadata.

Looks good.

We were having trouble running the script from the top level earlier and were directly calling the one that you're disabling. That'll be nice to get the top level one working again.

I hadn't seen the "import main_ as main" trick before. Interesting approach!

This revision is now accepted and ready to land.Oct 28 2015, 8:31 PM
tfiala added a comment.Nov 4 2015, 9:30 AM

I think this got checked in, right?

zturner closed this revision.Nov 4 2015, 9:35 AM