[Lldb-commits] [lldb] r283835 - This test was failing because /bin/ls is no longer debuggable on OS X.
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 10 17:35:41 PDT 2016
Author: jingham
Date: Mon Oct 10 19:35:41 2016
New Revision: 283835
URL: http://llvm.org/viewvc/llvm-project?rev=283835&view=rev
Log:
This test was failing because /bin/ls is no longer debuggable on OS X.
Add an executable that we can debug.
Added:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c
Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py
Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile?rev=283835&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile (added)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile Mon Oct 10 19:35:41 2016
@@ -0,0 +1,5 @@
+LEVEL = ../../make
+
+C_SOURCES := main.c
+
+include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py?rev=283835&r1=283834&r2=283835&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py Mon Oct 10 19:35:41 2016
@@ -22,7 +22,6 @@ class LaunchInTerminalTestCase(TestBase)
# a program in a separate terminal window. It would be great if other platforms
# added support for this.
@skipUnlessDarwin
- @expectedFailureDarwin("llvm.org/pr25484")
# If the test is being run under sudo, the spawned terminal won't retain that elevated
# privilege so it can't open the socket to talk back to the test case
@unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid()
@@ -35,13 +34,16 @@ class LaunchInTerminalTestCase(TestBase)
"test must be run on local system")
@no_debug_info_test
def test_launch_in_terminal(self):
- exe = "/bin/ls"
+ self.build()
+ exe = os.path.join(os.getcwd(), "a.out")
+
target = self.dbg.CreateTarget(exe)
launch_info = lldb.SBLaunchInfo(["-lAF", "/tmp/"])
launch_info.SetLaunchFlags(
lldb.eLaunchFlagLaunchInTTY | lldb.eLaunchFlagCloseTTYOnExit)
error = lldb.SBError()
process = target.Launch(launch_info, error)
+ print("Error was: %s."%(error.GetCString()))
self.assertTrue(
error.Success(),
"Make sure launch happened successfully in a terminal window")
Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c?rev=283835&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c (added)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c Mon Oct 10 19:35:41 2016
@@ -0,0 +1,10 @@
+#include <stdio.h>
+
+int
+main(int argc, char** argv)
+{
+ for (int i = 0; i < argc; i++) {
+ printf("%d: %s.\n", i, argv[i]);
+ }
+ return 0;
+}
More information about the lldb-commits
mailing list