diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py index d30cd2002d36c..725ddb877f9ec 100644 --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -804,6 +804,12 @@ def host_unwind_supports_jit(): config.available_features.add("use_msan_with_origins") +# Restrict the size of the on-disk CAS for tests. This allows testing in +# constrained environments (e.g. small TMPDIR). It also prevents leaving +# behind large files on file systems that do not support sparse files if a test +# crashes before resizing the file. +config.environment["LLVM_CAS_MAX_MAPPING_SIZE"] = "%d" % (100 * 1024 * 1024) + # Some tools support an environment variable "OBJECT_MODE" on AIX OS, which # controls the kind of objects they will support. If there is no "OBJECT_MODE" # environment variable specified, the default behaviour is to support 32-bit