This is especially useful when lit is invoked indirectly by the build
system, and additional arguments can not be easily specified.
Details
Diff Detail
Event Timeline
I'm sorry to crash the party but the added test fails on Linux:
$ "LIT_FILTER=o[a-z]e" "/usr/src/llvm/utils/lit/_venv/bin/python" "/usr/src/llvm/utils/lit/tests/../lit.py" "/usr/src/llvm/utils/lit/tests/../tests/Inputs/discovery" # command stderr: 'LIT_FILTER=o[a-z]e': command not found error: command failed with exit status: 127
It looks that lit does not expect shell-style variable substitutions here. I would suggest using env ... but I suppose that wouldn't be portable to Windows (not that I expect the current syntax to work any better there).
@mgorny I can fix this on Linux. I will not be able to do testing on Windows though.
TBH I haven't been able to run tests: how did you do that? I've even opened a bug about this: https://bugs.llvm.org/show_bug.cgi?id=33704
Is there a buildbot checking for those?
TBH I haven't been able to run tests: how did you do that? I've even opened a bug about this: https://bugs.llvm.org/show_bug.cgi?id=33704
./lit.py -v tests ;-)
Is there a buildbot checking for those?
I'd like to pursue one once we get all the current failures fixed.
@mgorny I still can't run them:
- No class called FileBasedTest: where is it?
- From which directory do you run it? If I run it from util/lit it misses FileCheck/etc. Or do you just modify $PATH?
- Can we document it somewhere?
It's a breakage from another commit. I'm currently working on finding a proper solution for it.
- From which directory do you run it? If I run it from util/lit it misses FileCheck/etc. Or do you just modify $PATH?
I have it installed in /usr/bin. However, modifying PATH should work as well.
- Can we document it somewhere?
Sure, please do ;-). Or maybe even add a CMake target for it ;-).
Running tests is documented in utils/lit/README.txt, in the section Contributing to lit.
As for a CMake target for lit tests, @delcypher added one in rL257221, but it was reverted because the tests failed on Windows.
Running tests is documented
Yeah, but they were failing, so I thought that maybe the documentation is out of date.
but it was reverted because the tests failed on Windows
that's a shame, can't we simply if/def around it for MSVC?
Yeah, but they were failing, so I thought that maybe the documentation is out of date.
Ah, whoops, I hadn't read your comment above before posting -- sorry!
that's a shame, can't we simply if/def around it for MSVC?
I agree, I think this would be a good thing to do as soon as possible. Unfortunately part of the test suite fails on all host machines at the moment. I commented on https://reviews.llvm.org/D35857#820783 with how I think would be a good way to proceed -- sorry for the scattered discussion.