diff options
author | Jim Ingham <jingham@apple.com> | 2016-10-11 00:35:41 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2016-10-11 00:35:41 +0000 |
commit | bc3236ba203b9ec52c03183218e6352cf5499509 (patch) | |
tree | c69b35316db02a2fc2da34d6ad97fa4185b381f6 /lldb/packages/Python/lldbsuite/test | |
parent | 8f96e82cb8ccfee75e56328159a84c0c7002f83f (diff) | |
download | bcm5719-llvm-bc3236ba203b9ec52c03183218e6352cf5499509.tar.gz bcm5719-llvm-bc3236ba203b9ec52c03183218e6352cf5499509.zip |
This test was failing because /bin/ls is no longer debuggable on OS X.
Add an executable that we can debug.
llvm-svn: 283835
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
3 files changed, 19 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile new file mode 100644 index 00000000000..0d70f259501 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile @@ -0,0 +1,5 @@ +LEVEL = ../../make + +C_SOURCES := main.c + +include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py b/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py index f4268f5bfa9..f0ecd464de1 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py @@ -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") diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tty/main.c b/lldb/packages/Python/lldbsuite/test/functionalities/tty/main.c new file mode 100644 index 00000000000..71c854b5bf4 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/tty/main.c @@ -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; +} |