[Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 6 15:29:35 PDT 2015

zturner added inline comments.

Comment at: test/dosep.py:82
@@ +81,3 @@
+    with output_lock:
+        print >> sys.stderr, stdout
+        print >> sys.stderr, "[%s] FAILED" % name
zturner wrote:
> chaoren wrote:
> > Why did you move this here? Could you please move stderr here too? It seems weird stderr is labeled but stdout isn't.
> I played with various combinations, and this way seemed the most intuitive when you actually run it with the various options and see the output.  The important thing is to make it consistent with the behavior of `report_test_pass`.  Currently, the output will look like this:
>     UNSUPPORTED: LLDB (d:\src\llvmbuild\ninja_release\bin\clang.exe-i686) :: test_sb_api_directory (TestPublicAPIHeaders.SBDirCheckerCase) (This test is only for LLDB.framework built 64-bit and !lldb.test_remote)
>     ----------------------------------------------------------------------
>     Ran 1 test in 0.157s
>     RESULT: PASSED (0 passes, 0 failures, 0 errors, 1 skipped, 0 expected failures, 0 unexpected successes)
>     [120998 refs]
>     [TestPublicAPIHeaders.py] PASSED
>       1 out of 387 test suites processed
> It looks awkward to me to label that with stdout.  stdout is what people normally expect to see as output.  So I kind of think only stderr should be labelled.  (Even better would be to use colors, but that's a followup).
> The reason I moved it before the `[%s] FAILED' line is because I think this is the easiest format for making sense of it when scanning it visually.  First you want to see the output, then you want to see whether it passed or failed, then you want to see the errors.  It's jarring to me to see the errors printed out before the message that says it failed.  By the time you finish scanning through the errors to 
Actually, because of the strange behavior of dotest, maybe there's not a better solution.  stdout is basically useless when a test passes *and* when it fails.  We might as well not print it at all.  So maybe I can just remove the stdout line, and only print stderr.  Don't even need to label it.  Because it's the only output that even means anything from dotest anyway AFAICT


More information about the lldb-commits mailing list