Skip to content

Commit b865c6f

Browse files
committed
Guard lit_config.quiet for lit versions that removed it.
test/lit.cfg reads lit_config.quiet directly, but upstream lit has dropped that attribute from LitConfig: --quiet survives only as a command line flag gating the result summary, and LitConfig.note() is now unconditional. Where the attribute is gone, parsing the config raises AttributeError, so the suite fails to load and no test is discovered at all. CI does not hit this yet, because it drives the suite with the lit package from PyPI -- currently 18.1.8, which still has the attribute -- and that version is independent of the clang-runtime a given row builds against. It does bite when running the suite with the in-tree llvm-lit of a recent LLVM, and it will bite CI once "pip install lit" resolves to a version that dropped it. Read the flag defensively so it works either way.
1 parent 73fff93 commit b865c6f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/lit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def inferClang(PATH):
246246
config.clang = inferClang(config.environment['PATH']).replace('\\', '/')
247247
config.cladlib = inferCladLib(config.environment['PATH']).replace('\\', '/')
248248

249-
if not lit_config.quiet:
249+
if not getattr(lit_config, 'quiet', False):
250250
lit_config.note('using clang: %r' % config.clang)
251251
lit_config.note('using auto diff lib: %r' % config.cladlib)
252252

0 commit comments

Comments
 (0)