[PATCH] D95339: [RFC][test] Adapt debug-info lit framework for more general purposes - part 1

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 17 03:53:36 PDT 2021


jhenderson added a comment.

In D95339#2629533 <https://reviews.llvm.org/D95339#2629533>, @dblaikie wrote:

> In D95339#2628285 <https://reviews.llvm.org/D95339#2628285>, @jhenderson wrote:
>
>> In D95339#2626418 <https://reviews.llvm.org/D95339#2626418>, @mehdi_amini wrote:
>>
>>> How does LLVM_ENABLE_PROJECTS=cross-project-tests will work if only configure a subset of the projects? Or will it requires all the projects to be configured?
>>
>> By the end of the patch series, the aim is to have tests marked as UNSUPPORTED if certain tools cannot be found, possibly due to them not being in LLVM_ENABLE_PROJECTS. If they are in LLVM_ENABLE_PROJECTS and cannot be found, the tests will fail.
>>
>> The existing rules already mark some tests as UNSUPPORTED if lldb is not found in the environment somewhere (possibly because it is built due to being in LLVM_ENABLE_PROJECTS, or possibly because it is installed on the machine).
>>
>> D96511 <https://reviews.llvm.org/D96511> (the fourth patch in this series) will mark tests as UNSUPPORTED if clang can't be found and isn't in LLVM_ENABLED_PROJECTS. The configuration matrix in this case would be:
>>
>> - clang in "LLVM_ENABLED_PROJECTS" and clang not found - error for missing tool.
>
> Out of curiosity, any particular scenarios where you expect this ^ to come up. (does this configuration require the user to manually ensure the clang subproject was built before running the tests? So this error would be telling the user to go and run a separate build target before running the test target? If that's the case, it'd be good to have the dependencies added automatically if possible - in which case when would this error turn up? Only if there's some internal build system failure (akin to someone deleting a file out from underneath the build system - as unlikely as a .o file (under the purview of the build system) being missing from a linker invocation))

Just to be clear, clang (and later lld in a future change) is already in the list of dependencies for check-debuginfo, so the dependency is there, if you run check-debuginfo to run the tests. The use case I've got in mind is where someone didn't use check-* to build the test dependencies. I routinely run subsets of the lit tests without running a check-* target, because I often am working on individual tools or tests, and there's no need for me to build the rest of LLVM (I build the one executable, say llvm-readelf, and that's about it). If a user happens to have cleared out their build directory beforehand and then try to run the tests in this way, lit will emit the error about a missing tool rather than the test itself failing, so you get quicker and clearer feedback.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95339/new/

https://reviews.llvm.org/D95339



More information about the llvm-commits mailing list