[PATCH] D139592: [llvm-lit] Keep start/end part of the output when truncating

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 11:16:37 PST 2022


jdenny added a comment.

In D139592#3984976 <https://reviews.llvm.org/D139592#3984976>, @a.elovikov wrote:

> Do you have a reference to how the simple test should look like? I've checked a couple of tests in utils/lit/tests but they look like an overkill for this patch.

You could add a new case to `llvm/utils/lit/tests/shtest-output-printing.py`.  That means another example test file in `llvm/utils/lit/tests/Inputs/shtest-output-printing/`.

You could have the example test file's RUN line dump >1024 bytes.  That's about 13 lines in an 80-column window, so it wouldn't be terrible to hardcode the text in an echo command.

The check lines could look for the first few bytes of the output, the "...", and the very last few bytes.  It doesn't seem worthwhile to verify the start and end are actually 512 bytes.

This seems straight-forward, but let me know if I overlooked a complexity.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139592/new/

https://reviews.llvm.org/D139592



More information about the llvm-commits mailing list