<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 4:52 PM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On May 31, 2016, at 4:48 PM, Daniel Dunbar via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div><div dir="ltr">Hi all,<div><br></div><div>I have some patches up in:</div><div>  <a href="http://reviews.llvm.org/D20721" target="_blank">http://reviews.llvm.org/D20721</a></div><div>to make `lit` output more readable when commands fail. I'd like to get a little more feedback on this before landing, since it impacts how test failures appear when using the internal shell script runner (which is not the default so this will currently mostly impact Windows or test frameworks that intentionally set this behavior).</div><div><br></div><div>These patches change the output of a script like `true && echo hi && false` to something like:</div></div></div></blockquote><div><br></div></span><div>What would the output of "echo '$ echo hi ' " be and how do you differentiate from '$ echo hi' ? </div></div></div></blockquote><div><br></div><div>"Don't do that"?</div><div><br></div><div>Actually, the output I gave wasn't complete, what we actually currently show is:</div><div>```</div><div>$ "echo" "hi"<br></div><div># command output:<br></div><div>hi<br></div><div>```</div><div>but of course your comment still applies. However, the goal is to make for a readable output for the majority of use cases, not necessarily to be unambiguous.</div><div><br></div><div> - Daniel</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br></div>-- </div><div>Mehdi</div><div><br><blockquote type="cite"><div><div><div class="h5"><div dir="ltr"><div><br></div><div>```</div><div>$ true</div><div>$ echo hi</div><div>hi</div><div>    </div><div>$ false</div><div>note: command had no output on stdout or stderr</div><div>error: command failed with exit status 1</div><div>```</div><div><br></div><div>instead of the old:</div><div><br></div><div>```</div><div>Command 0: "true"</div><div>Command 0 Result: 0</div><div>Command 0 Output:</div><div><br></div><div><br></div><div>Command 0 Stderr:</div><div><br></div><div><br></div><div>Command 1: "echo" "hi"</div><div>Command 1 Result: 0</div><div>Command 1 Output:</div><div>hi</div><div><br></div><div><br></div><div>Command 1 Stderr:</div><div><br></div><div><br></div><div>Command 2: "wc" "missing-file"</div><div>Command 2 Result: 1</div><div>Command 2 Output:</div><div>None</div><div><br></div><div>Command 2 Stderr:</div><div>None</div><div>```</div><div><br></div><div>which I think is significantly more readable.</div><div><br></div><div>One change in the patches is that it will also start including, inline, the output of files which were redirected. This solves a common problem where a  command fails when it wasn't expected to, and its output was captured. In such cases the test log just showed the command failure, but since the output was redirected you couldn't tell from the log why the common failed.</div><div><br></div><div>Please let me know if you have any objections to the new format.</div><div><br></div><div> - Daniel</div><div><br></div></div></div></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></blockquote></div><br></div></div>