This is an archive of the discontinued LLVM Phabricator instance.

[LIT] Add the –run-under parameter to lit, which lit.cfg will then use.
AbandonedPublic

Authored by mcrosier on Dec 2 2015, 12:04 PM.

Details

Summary

This functionality already exists within the make infrastructure in the form of several environment variables, but does not exist in the cmake infrastructure at present.

Diff Detail

Event Timeline

mcrosier updated this revision to Diff 41658.Dec 2 2015, 12:04 PM
mcrosier retitled this revision from to [LIT] Add the –run-under parameter to lit, which lit.cfg will then use. .
mcrosier updated this object.
mcrosier added a subscriber: llvm-commits.
MatzeB edited edge metadata.Dec 2 2015, 12:09 PM

This patch has no context, and the code seems to just pass along a configuration option, doesn't it?

rnk edited edge metadata.Dec 2 2015, 1:11 PM

Agreed, what is the actual use case? Running with a dynamic tool like valgrind? Adding LD_PRELOAD? Remote test execution? Remotely executing tests that were cross-compiled?

MatzeB added a comment.Dec 2 2015, 1:18 PM

This patch has no context, and the code seems to just pass along a configuration option, doesn't it?

Oh I just realize that this is probably meant for the test-suite lit stuff.

It feels a bit weird to add parameters to main lit that are not used anywhere inside llvm. Do you expect this to be used often or would using something like "lit -DRUN_UNDER=xxx" which already exists be enough?

For the remote running stuff that I just pushed in test-suite r254545 I decided to configure things through lit.site.cfg and have the configuration options in cmake. This works nicely if the way you build things is somewhat tied to how you execute them which is the case for my typical cases where you cross compile to a device and execute remotely there. Maybe your use case is similar?

mcrosier accepted this revision.Dec 2 2015, 2:00 PM
mcrosier added a reviewer: mcrosier.

For the remote running stuff that I just pushed in test-suite r254545 I decided to configure things through lit.site.cfg and have the configuration options in cmake. This works nicely if the way you build things is somewhat tied to how you execute them which is the case for my typical cases where you cross compile to a device and execute remotely there. Maybe your use case is similar?

Your commit of r254545 does exactly what I was looking for! Thanks, Matthias.

This revision is now accepted and ready to land.Dec 2 2015, 2:00 PM
mcrosier abandoned this revision.Dec 2 2015, 7:56 PM