This is an archive of the discontinued LLVM Phabricator instance.

[lit] Generate a single lit cfg file for tests that require dotest.py
ClosedPublic

Authored by stella.stamenova on Apr 20 2018, 7:50 PM.

Details

Summary

The current way that the lit configuration is generated for the LLDB tests that run using dotest causes cmake to fail when using a generator which supports multiple configurations (such as Visual Studio). The failure is because file GENERATE will create a file *per possible configuration* resulting in the same lit configuration file being overwritten multiple times.

To fix the issue, we need to create a single lit file that is agnostic of the configurations and can be used for any configuration.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere accepted this revision.Apr 21 2018, 1:27 AM

One inline question/suggestion but otherwise this LGTM. Thanks Stella!

test/CMakeLists.txt
125 ↗(On Diff #143430)

Is there any disadvantage to moving this and the next set or arguments to the LLDB_EXECUTABLE_PATH_ARGS_STR?

168 ↗(On Diff #143430)

s/coopy/copy/

This revision is now accepted and ready to land.Apr 21 2018, 1:27 AM
stella.stamenova marked an inline comment as done.

Fix a couple of comments to be more accurate and fix a typo

I don't have commit permissions, @JDevlieghere or @asmith, would you be kind enough to check it in?

test/CMakeLists.txt
125 ↗(On Diff #143430)

They need to be in the common arguments since they need to be appended in both cases (for lit and for dotest).

If you are asking whether if we put them in LLDB_EXECUTABLE_PATH_ARGS_STR and did the build_mode replacement it would change them - it won't since they won't contain CMAKE_CFG_INTDIR.

If you are asking whether we can append them to LLDB_EXECUTABLE_PATH_ARGS (without STR), that's not sufficient either since we need them to end up in the lit file as well.

This revision was automatically updated to reflect the committed changes.