[llvm] [lit] add `LIT_MAX_WORKERS` env variable (PR #76205)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 21 21:20:45 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-testing-tools
Author: Maksim Levental (makslevental)
<details>
<summary>Changes</summary>
I find myself fiddling with `ARGS "-j"` very frequently when switching between groups of tests with `LIT_FILTER`. Then invariably I accidentally commit `ARGS "-j1"` or something like that. This env variable (analogous to `LIT_FILTER`) resolves the issue.
Not sure how to test but I'm pretty sure this is "correct code".
---
Full diff: https://github.com/llvm/llvm-project/pull/76205.diff
1 Files Affected:
- (modified) llvm/utils/lit/lit/cl_arguments.py (+1-1)
``````````diff
diff --git a/llvm/utils/lit/lit/cl_arguments.py b/llvm/utils/lit/lit/cl_arguments.py
index ba3706659550b6..b9122d07afd8a1 100644
--- a/llvm/utils/lit/lit/cl_arguments.py
+++ b/llvm/utils/lit/lit/cl_arguments.py
@@ -36,7 +36,7 @@ def parse_args():
metavar="N",
help="Number of workers used for testing",
type=_positive_int,
- default=lit.util.usable_core_count(),
+ default=os.getenv("LIT_MAX_WORKERS", lit.util.usable_core_count()),
)
parser.add_argument(
"--config-prefix",
``````````
</details>
https://github.com/llvm/llvm-project/pull/76205
More information about the llvm-commits
mailing list