<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I'd love to see lit report which of the commands failed! I sometimes change lit locally:</div><div class=""><br class=""></div><div class=""><div class="">-            f.write('set -o pipefail;')</div><div class="">+            f.write('set -o pipefail -x;')</div></div><div class=""><br class=""></div><div class="">as a bad hack to get this information. We could certainly run the tests one by one instead of concatenating them (in fact lit on windows does that and does report which one failed AFAIK). I did not make this change on unix because I feared it would slow down testing...</div><div class=""><br class=""></div><div class="">In anyway the FileCheck modification you proposed should improve the situation a bit. LGTM.</div><div class=""><br class=""></div><div class="">- Matthias</div><br class=""><div><blockquote type="cite" class=""><div class="">On May 27, 2016, at 12:22 PM, Xinliang David Li via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">This is a good idea -- except that there seems to be no good way to implement that.<div class=""><br class=""></div><div class="">For each test, tit tester first creates a shell script that executes subtests as</div><div class=""> ...{ .... | FileCheck ..; } && { .... | FIleCheck ... ; } && ...</div><div class=""><br class=""></div><div class="">when one sub test fails, the information about which one is lost. </div><div class=""><br class=""></div><div class="">I will go ahead with this change first. If there are good suggestions on lit improvement, we can revisit it later.</div><div class=""><br class=""></div><div class="">thanks,</div><div class=""><br class=""></div><div class="">David </div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, May 27, 2016 at 11:09 AM, David Blaikie <span dir="ltr" class=""><<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Should we instead modify lit to indicate which command it stopped at? That would seem more general/to cover other cases as well?</div><div class="gmail_extra"><br class=""><div class="gmail_quote"><div class=""><div class="h5">On Thu, May 26, 2016 at 6:05 PM, David Li via llvm-commits <span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span> wrote:<br class=""></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div class="h5">davidxl created this revision.<br class="">
davidxl added a reviewer: dblaikie.<br class="">
davidxl added a subscriber: llvm-commits.<br class="">
<br class="">
FileCheck dumps minimal information when input is empty.  We have many tests that include more than one FileCheck command lines. When such an error happens, figuring out which command actually is the problem can be hard sometimes (e.g, without running environment to reproduce).<br class="">
<br class="">
This patch enables FileCheck to dump the full command line as a context line so that it is easier to identify the problem.<br class="">
<br class="">
<a href="http://reviews.llvm.org/D20716" rel="noreferrer" target="_blank" class="">http://reviews.llvm.org/D20716</a><br class="">
<br class="">
Files:<br class="">
  test/FileCheck/check-empty.txt<br class="">
  utils/FileCheck/FileCheck.cpp<br class="">
<br class="">
Index: utils/FileCheck/FileCheck.cpp<br class="">
===================================================================<br class="">
--- utils/FileCheck/FileCheck.cpp<br class="">
+++ utils/FileCheck/FileCheck.cpp<br class="">
@@ -1298,6 +1298,13 @@<br class="">
     CheckPrefixes.push_back("CHECK");<br class="">
 }<br class="">
<br class="">
+static void DumpCommandLine(int argc, char **argv) {<br class="">
+  errs() << "FileCheck command line: ";<br class="">
+  for (int I = 0; I < argc; I++)<br class="">
+    errs() << " " << argv[I];<br class="">
+  errs() << "\n";<br class="">
+}<br class="">
+<br class="">
 int main(int argc, char **argv) {<br class="">
   sys::PrintStackTraceOnErrorSignal();<br class="">
   PrettyStackTraceProgram X(argc, argv);<br class="">
@@ -1331,6 +1338,7 @@<br class="">
<br class="">
   if (File->getBufferSize() == 0 && !AllowEmptyInput) {<br class="">
     errs() << "FileCheck error: '" << InputFilename << "' is empty.\n";<br class="">
+    DumpCommandLine(argc, argv);<br class="">
     return 2;<br class="">
   }<br class="">
<br class="">
Index: test/FileCheck/check-empty.txt<br class="">
===================================================================<br class="">
--- test/FileCheck/check-empty.txt<br class="">
+++ test/FileCheck/check-empty.txt<br class="">
@@ -7,5 +7,6 @@<br class="">
 ; NOFOO-NOT: foo<br class="">
<br class="">
 ; EMPTY-ERR: FileCheck error: '-' is empty.<br class="">
+; EMPTY-ERR-NEXT: FileCheck command line: {{.*}}FileCheck -check-prefix={{.*}}FOO {{.*}}check-empty.txt<br class="">
 ; NO-EMPTY-ERR-NOT: FileCheck error: '-' is empty.<br class="">
 ; NOT-FOUND: error: expected string not found in input<br class="">
<br class="">
<br class="">
<br class=""></div></div>_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</blockquote></div><br class=""></div>
_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits<br class=""></div></blockquote></div><br class=""></body></html>