[llvm] b52820e - [lit] Support reading arguments from a file
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 01:02:21 PDT 2022
Author: Petr Hosek
Date: 2022-08-24T08:01:58Z
New Revision: b52820edec6f3d95edef7859a56ef30878b08382
URL: https://github.com/llvm/llvm-project/commit/b52820edec6f3d95edef7859a56ef30878b08382
DIFF: https://github.com/llvm/llvm-project/commit/b52820edec6f3d95edef7859a56ef30878b08382.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
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-commits
mailing list