[llvm] [CAS] Restrict the CAS size when running lit testing (PR #167024)
Steven Wu via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 13:52:51 PST 2025
https://github.com/cachemeifyoucan created https://github.com/llvm/llvm-project/pull/167024
Set env to make a smaller default CAS size when running lit test. This
allows less disk usage on file system that doesn't support sparse file.
>From 78c6fd08bff22223756321247c169a63bc489fbb Mon Sep 17 00:00:00 2001
From: Steven Wu <stevenwu at apple.com>
Date: Fri, 7 Nov 2025 13:52:41 -0800
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.7
---
llvm/test/lit.cfg.py | 6 ++++++
1 file changed, 6 insertions(+)
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
More information about the llvm-commits
mailing list