This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Make "inline" tests more configurable
ClosedPublic

Authored by labath on May 25 2020, 7:14 AM.

Details

Summary

This patch adds two new arguments to the MakeInlineTest function. The
main motivation is a follow-up patch I'm preparing, but they seem
generally useful.

The first argument allows the user to specify the "build dictionary".
With this argument one can avoid the need to provide a custom Makefile
if all he needs is to override a couple of make variables. This hooks in
neatly into the existing dictionary support for non-inline tests.

The second argument specifies the name of the test. This could be used
to provide better names to the generated test classes, but it's mainly
useful in conjuction with the first argument: now that we can specify a
custom build dictionary, it may sometimes make sense to run the same
test twice with different build configurations. To achieve that, we need
to give the two tests different names, and this argument achieves that.

The usage of the arguments is demonstrated via TestBasicEntryValues.py.

Diff Detail

Event Timeline

labath created this revision.May 25 2020, 7:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2020, 7:14 AM
vsk accepted this revision.May 26 2020, 12:30 PM

Thanks, lgtm.

This revision is now accepted and ready to land.May 26 2020, 12:30 PM
JDevlieghere accepted this revision.May 26 2020, 1:48 PM
This revision was automatically updated to reflect the committed changes.
lldb/packages/Python/lldbsuite/test/lldbinline.py