This is an archive of the discontinued LLVM Phabricator instance.

[dotest] Centralize initialization commands even more
ClosedPublic

Authored by labath on Sep 4 2019, 7:29 AM.

Details

Summary

In r367234 we introduced a central place to hold the set up commands for
the various ways we have of launching lldb. However, a number of
commands still remained outside of that.

This patch moves the remaining set up commands into this function, which
allows us to remove manual clang module path setting code in
TestBatchMode.

One unfortunate victim of this approach is TestSTTYBeforeAndAfter which,
due to how it launches lldb (pexpect->expect->lldb), fails get the
quoting right. It would be possible to fix the quoting there, it would be a bit
icky, and none of the commands in this list are really relevant for what this
test is doing, so I just remove the commands outright.

Event Timeline

labath created this revision.Sep 4 2019, 7:29 AM
JDevlieghere accepted this revision.Sep 4 2019, 9:12 AM
JDevlieghere added inline comments.
packages/Python/lldbsuite/test/lldbtest.py
709

I'm curious why you changed this to use + instead of format?

This revision is now accepted and ready to land.Sep 4 2019, 9:12 AM
labath marked an inline comment as done.Sep 5 2019, 12:31 AM
labath added inline comments.
packages/Python/lldbsuite/test/lldbtest.py
709

In that moment, it seemed better to me because it is shorter, so I did it as a drive-by. Though now, it's not clear to me that it is really an improvement. I'll just put that back...

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 5 2019, 12:35 AM