<div dir="ltr">Hello Greg,<div><br></div><div>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'".</div><div><br></div><div>Could you skip it or mark it as expectedFailure for OS X? It has broken our build.</div><div><br></div><div>Log:</div><div><div>======================================================================<br></div><div>FAIL: test_launch_in_terminal (TestTerminal.LaunchInTerminalTestCase)</div><div>----------------------------------------------------------------------</div><div>Traceback (most recent call last):</div><div>  File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/tty/TestTerminal.py", line 36, in test_launch_in_terminal</div><div>    self.assertTrue(error.Success(), "Make sure launch happened successfully in a terminal window")</div><div>AssertionError: False is not True : Make sure launch happened successfully in a terminal window</div><div>Config=x86_64-clang</div><div><br></div></div><div>Thanks,</div><div>Ilia</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 6, 2015 at 10:17 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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>
</blockquote></div><br></div>