Page MenuHomePhabricator

[lit] Parse command-line options from LIT_OPTS
ClosedPublic

Authored by jdenny on Jul 3 2019, 7:59 AM.

Details

Summary

Similar to FILECHECK_OPTS for FileCheck, LIT_OPTS makes it easy to
adjust lit behavior when running the test suite via ninja. For
example:

$ LIT_OPTS='--time-tests -vv --filter=threadprivate' \
  ninja check-clang-openmp

Diff Detail

Repository
rL LLVM

Event Timeline

jdenny created this revision.Jul 3 2019, 7:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 3 2019, 7:59 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
rnk added a comment.Jul 3 2019, 1:42 PM

I think it would be preferable to standardize on llvm-lit as the way to re-run particular tests with some options.

rnk removed a reviewer: rnk.Jul 3 2019, 1:42 PM
jdenny added a subscriber: rnk.Jul 3 2019, 2:04 PM
In D64135#1569174, @rnk wrote:

I think it would be preferable to standardize on llvm-lit as the way to re-run particular tests with some options.

Thanks for the comment. Why so?

For me, it seems quicker to use LIT_OPTS and ninja because I don't have to extract the lit command line from ninja -v. For ninja check-all, that's a lot to copy and paste. It also avoids forgetting to rebuild while I'm alternating between hacking the source and re-running failing tests.

jdenny removed a subscriber: rnk.Jul 3 2019, 2:25 PM

lit has options?

If this works when running llvm-lit.py as well as ninja check-foo, I can see it being handy for those (rare at least for me) occasions when a lit option is what you want. And it looks pretty cheap.

Re tests, I don't see why you have 4, wouldn't 2 be sufficient? Given that 2, 3, and 4 are identical.

jdenny added a comment.Jul 3 2019, 3:45 PM

lit has options?

:-)

If this works when running llvm-lit.py as well as ninja check-foo, I can see it being handy for those (rare at least for me) occasions when a lit option is what you want. And it looks pretty cheap.

Lately, I most often use -vv (so I can see the line number of a failed RUN command) and -a (so I can verify the passing tests are doing what I expect).

Re tests, I don't see why you have 4, wouldn't 2 be sufficient? Given that 2, 3, and 4 are identical.

Good point. Actually, 1 is probably enough for what I actually mean to test. I'll adjust soon.

Thanks.

jdenny updated this revision to Diff 208055.Jul 4 2019, 10:10 AM

Simplify test as discussed with @probinson. Improve wording in docs slightly.

This revision is now accepted and ready to land.Jul 7 2019, 3:37 PM
This revision was automatically updated to reflect the committed changes.