<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 13, 2016, at 11:26 AM, Zachary Turner <<a href="mailto:zturner@google.com" class="">zturner@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thanks! btw would having the command write its output to a file instead of stdout solve the pexpect problme as well?</div><br class=""></div></blockquote><div><br class=""></div><div>That’s possible - but I would need to play with it a little bit to convince myself that it really is a faithful reproduction of my original issue</div><div>It’ll take me a little while to get to it - stay tuned.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Jan 13, 2016 at 11:22 AM Enrico Granata <<a href="mailto:egranata@apple.com" class="">egranata@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 13, 2016, at 10:34 AM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank" class="">zturner@google.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Jan 13, 2016 at 10:25 AM Enrico Granata <<a href="mailto:egranata@apple.com" target="_blank" class="">egranata@apple.com</a>> wrote:<br class=""></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" class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 13, 2016, at 10:21 AM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank" class="">zturner@google.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">On Wed, Jan 13, 2016 at 10:15 AM Enrico Granata via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" target="_blank" class="">lldb-commits@lists.llvm.org</a>> wrote:<br class=""></div><div class=""><div class="gmail_quote"><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">+<br class="">+class CommandScriptImmediateOutputTestCase (PExpectTest):<br class=""></blockquote>Does the bug that you were trying to fix occur only when using the command_script.py file from the lldb command line? If you load it from within lldb via an LLDB command, does the problem still occur? If the problem you are fixing is not specific to the LLDB command line, I would prefer if you write this not as a pexpect test.</div></div></div></div></blockquote><div class=""><br class=""></div></div></div><div style="word-wrap:break-word" class=""><div class=""><div class="">I would love to not touch pexpect :-) But in this case, I can’t see a way around it. I am trying to detect whether some text is “physically” printed to stdout. And pexpect seems the most obvious straightforward way to get that to happen. Note that, in this bug, the result object is filled in correctly even if nothing gets printed, so looking at the result won’t quite cut it - it really needs to detect output to stdout.</div></div></div></blockquote><div class="">You're calling result.SetImmediateOutputFile(sys.__stdout__). Wouldn't it work to use a file on the file system here, and then you open that file and look at it after running the commands? It wouldn't work in remote cases, but it already doesn't work on remote cases anyway (as you point out below)</div><div class=""> </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" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="gmail_quote"><div class=""> </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">+<br class="">+ mydir = TestBase.compute_mydir(__file__)<br class="">+<br class="">+ def setUp(self):<br class="">+ # Call super's setUp().<br class="">+ PExpectTest.setUp(self)<br class="">+<br class="">+ @skipIfRemote # test not remote-ready<span class=""> </span><a href="http://llvm.org/pr24813" rel="noreferrer" target="_blank" class="">llvm.org/pr24813</a><br class="">+ @expectedFlakeyFreeBSD("<a href="http://llvm.org/pr25172" rel="noreferrer" target="_blank" class="">llvm.org/pr25172</a><span class=""> </span>fails rarely on the buildbot")<br class="">+ @expectedFlakeyLinux("<a href="http://llvm.org/pr25172" rel="noreferrer" target="_blank" class="">llvm.org/pr25172</a>")<br class=""></blockquote><div class="">Are these necessary? The windows one is necessary (but not if you change this to not being a pexpect test as I've requested above), but why are the other ones necessary?</div></div></div></div></div></blockquote></div></div><div style="word-wrap:break-word" class=""><div class=""></div><div class=""><br class=""></div>Do we support remote pexpect? As for FreeBSD and Linux, they might not be necessary, but I’d rather much remove them (or let the relevant platform owners) remove them in a separate commit<br class=""><div class=""><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br class=""></div></div></div></blockquote><div class="">No remote pexpect, so the @skipIfRemote probably needs to be there. But I think everyone should be checking in tests enabled by default in the widest set of environments possible that you aren't completely sure are broken. It should be up to the platform holders to disable broken tests, not to enable working tests. Because it's much easier to notice a broken test going in than it is to notice a working test went in disabled (because who's going to think to test it out?).</div></div></div></div></blockquote></div><div class=""><br class=""></div></div><div style="word-wrap:break-word" class="">This is a fair point. I’ll enable those platforms in a subsequent commit ASAP</div><div style="word-wrap:break-word" class=""><br class=""><div class="">
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br class="">Thanks,</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><i class="">- Enrico</i><br class="">📩 egranata@<font color="#ff2600" class=""></font>.com ☎️ 27683</div>
</div>
<br class=""></div></blockquote></div>
</div></blockquote></div><br class=""><div class="">
<div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">Thanks,</div><div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><i class="">- Enrico</i><br class="">📩 egranata@<font color="#ff2600" class=""></font>.com ☎️ 27683</div>
</div>
<br class=""></body></html>