[PATCH] D80694: Improve lit.py's usability by highlighting failing lines.

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 28 16:32:20 PDT 2020


yln added inline comments.


================
Comment at: llvm/utils/lit/lit/TestRunner.py:1637-1639
+    output = createScriptOutput(litConfig, script,
+                                out if out else err,
+                                status, exitCode)
----------------
varungandhi-apple wrote:
> The `out if out else err` might seem a bit strange (this was tripping me up for a while). For reasons I haven't tried digging into (perhaps it has to do with internal vs external shell), looks like sometimes the command output that's applicable is coming from stdout and sometimes it is coming from stderr. You can look at the `shtest-run-at-line.py` test case to see this in action. So I ended up going with a best effort "try this or that". Maybe we can make this more precise.
> 
> [Now I'm wondering if this ^ should be a TODO in the code instead of a review comment...]
The code below makes me think that we should try to find the RUN line (`locateLastFailingRunLine(cmdOutput)`) in both stdout and stderr.


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

https://reviews.llvm.org/D80694





More information about the llvm-commits mailing list