[llvm-branch-commits] [llvm] 427e1ea - [lit] Support reading arguments from a file
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Aug 25 00:40:16 PDT 2022
Author: Petr Hosek
Date: 2022-08-25T09:04:03+02:00
New Revision: 427e1ea3e7dea96b142035b3fb9fbe9ea3768763
URL: https://github.com/llvm/llvm-project/commit/427e1ea3e7dea96b142035b3fb9fbe9ea3768763
DIFF: https://github.com/llvm/llvm-project/commit/427e1ea3e7dea96b142035b3fb9fbe9ea3768763.diff
LOG: [lit] Support reading arguments from a file
This allows reading arguments from file using the response file syntax.
We would like to use this in the LLVM build to pass test suites from
subbuilds.
Differential Revision: https://reviews.llvm.org/D132437
(cherry picked from commit b52820edec6f3d95edef7859a56ef30878b08382)
Added:
Modified:
llvm/docs/CommandGuide/lit.rst
llvm/utils/lit/lit/cl_arguments.py
Removed:
################################################################################
diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst
index cda6de4f0c8c9..31e272636bab8 100644
--- a/llvm/docs/CommandGuide/lit.rst
+++ b/llvm/docs/CommandGuide/lit.rst
@@ -43,6 +43,9 @@ parsing options from the command line. ``LIT_OPTS`` is primarily useful for
supplementing or overriding the command-line options supplied to :program:`lit`
by ``check`` targets defined by a project's build system.
+:program:`lit` can also read options from response files which are specified as
+inputs using the ``@path/to/file.rsp`` syntax.
+
Users interested in the :program:`lit` architecture or designing a
:program:`lit` testing implementation should see :ref:`lit-infrastructure`.
diff --git a/llvm/utils/lit/lit/cl_arguments.py b/llvm/utils/lit/lit/cl_arguments.py
index a7488774802fd..43bbd6fdaa96c 100644
--- a/llvm/utils/lit/lit/cl_arguments.py
+++ b/llvm/utils/lit/lit/cl_arguments.py
@@ -16,7 +16,7 @@ class TestOrder(enum.Enum):
def parse_args():
- parser = argparse.ArgumentParser(prog='lit')
+ parser = argparse.ArgumentParser(prog='lit', fromfile_prefix_chars='@')
parser.add_argument('test_paths',
nargs='+',
metavar="TEST_PATH",
More information about the llvm-branch-commits
mailing list