<div dir="ltr">Hello,<div><br></div><div>Can you review please?</div><div><a href="http://reviews.llvm.org/D7102">http://reviews.llvm.org/D7102</a></div><div><br></div><div>Thanks,</div><div>Ilia</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 10:20 PM,  <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The cmake build apparently doesn't build this tool.  The Xcode project does, and the test runs correctly.<br>
<br>
The correct fix is to get cmake to build it for Darwin.  It would be a little odd to mark it expected fail on Darwin, when it actually does succeed on Darwin depending on how it's built...<br>
<br>
Jim<br>
<div class="HOEnZb"><div class="h5"><br>
> On Jan 20, 2015, at 9:43 AM, Ilia K <<a href="mailto:ki.stfu@gmail.com">ki.stfu@gmail.com</a>> wrote:<br>
><br>
> Hello Greg,<br>
><br>
> Sorry for delay but this test doesn't work in OS X since the moment as it was added. Target::Launch returns the following error: "the 'darwin-debug' executable doesn't exists at '/Users/IliaK/p/llvm/build_ninja/lib/python2.7/site-packages/lldb/darwin-debug'".<br>
><br>
> Could you skip it or mark it as expectedFailure for OS X? It has broken our build.<br>
><br>
> Log:<br>
> ======================================================================<br>
> FAIL: test_launch_in_terminal (TestTerminal.LaunchInTerminalTestCase)<br>
> ----------------------------------------------------------------------<br>
> Traceback (most recent call last):<br>
>   File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/tty/TestTerminal.py", line 36, in test_launch_in_terminal<br>
>     self.assertTrue(error.Success(), "Make sure launch happened successfully in a terminal window")<br>
> AssertionError: False is not True : Make sure launch happened successfully in a terminal window<br>
> Config=x86_64-clang<br>
><br>
> Thanks,<br>
> Ilia<br>
><br>
><br>
> On Tue, Jan 6, 2015 at 10:17 PM, Greg Clayton <<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>> wrote:<br>
> Author: gclayton<br>
> Date: Tue Jan  6 13:17:58 2015<br>
> New Revision: 225284<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=225284&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=225284&view=rev</a><br>
> Log:<br>
> Added a test case for launching a process in a separate terminal window to ensure we don't regress on this.<br>
><br>
> A recent POSIX host thread issue where HostThreadPosix::Join() wasn't returning the thread result was responsible for this regression, yet we had no test case covering this so it wasn't discovered.<br>
><br>
><br>
> Added:<br>
>     lldb/trunk/test/functionalities/tty/<br>
>     lldb/trunk/test/functionalities/tty/TestTerminal.py<br>
><br>
> Added: lldb/trunk/test/functionalities/tty/TestTerminal.py<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/tty/TestTerminal.py?rev=225284&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/tty/TestTerminal.py?rev=225284&view=auto</a><br>
> ==============================================================================<br>
> --- lldb/trunk/test/functionalities/tty/TestTerminal.py (added)<br>
> +++ lldb/trunk/test/functionalities/tty/TestTerminal.py Tue Jan  6 13:17:58 2015<br>
> @@ -0,0 +1,35 @@<br>
> +"""<br>
> +Test lldb command aliases.<br>
> +"""<br>
> +<br>
> +import os, time<br>
> +import unittest2<br>
> +import lldb<br>
> +from lldbtest import *<br>
> +import lldbutil<br>
> +<br>
> +class LaunchInTerminalTestCase(TestBase):<br>
> +<br>
> +    mydir = TestBase.compute_mydir(__file__)<br>
> +<br>
> +    # Darwin is the only platform that I know of that supports optionally launching<br>
> +    # a program in a separate terminal window. It would be great if other platforms<br>
> +    # added support for this.<br>
> +    @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")<br>
> +    def test_launch_in_terminal (self):<br>
> +        exe = "/bin/ls"<br>
> +        target = self.dbg.CreateTarget(exe)<br>
> +        launch_info = lldb.SBLaunchInfo(["-lAF", "/tmp/"])<br>
> +        launch_info.SetLaunchFlags(lldb.eLaunchFlagLaunchInTTY)<br>
> +        error = lldb.SBError()<br>
> +        process = target.Launch (launch_info, error)<br>
> +        self.assertTrue(error.Success(), "Make sure launch happened successfully in a terminal window")<br>
> +        # Running in synchronous mode our process should have run and already exited by the time target.Launch() returns<br>
> +        self.assertTrue(process.GetState() == lldb.eStateExited)<br>
> +<br>
> +if __name__ == '__main__':<br>
> +    import atexit<br>
> +    lldb.SBDebugger.Initialize()<br>
> +    atexit.register(lambda: lldb.SBDebugger.Terminate())<br>
> +    unittest2.main()<br>
> +<br>
><br>
><br>
> _______________________________________________<br>
> lldb-commits mailing list<br>
> <a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
><br>
> _______________________________________________<br>
> lldb-commits mailing list<br>
> <a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
<br>
</div></div></blockquote></div><br></div>