Skip to content

Commit

Permalink
[lit] Support reading arguments from a file
Browse files Browse the repository at this point in the history
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 b52820e)
  • Loading branch information
petrhosek authored and tru committed Aug 25, 2022
1 parent 0cc033e commit 427e1ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions llvm/docs/CommandGuide/lit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion llvm/utils/lit/lit/cl_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 427e1ea

Please sign in to comment.