diff options
author | Zachary Turner <zturner@google.com> | 2015-10-28 17:43:26 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-10-28 17:43:26 +0000 |
commit | c432c8f856e0bd84de980a9d9bb2d31b06fa95b1 (patch) | |
tree | 4efa528e074a6e2df782345e4cd97f5d85d038c4 /lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py | |
parent | a8a3bd210086b50242903ed95048fe5e53897878 (diff) | |
download | bcm5719-llvm-c432c8f856e0bd84de980a9d9bb2d31b06fa95b1.tar.gz bcm5719-llvm-c432c8f856e0bd84de980a9d9bb2d31b06fa95b1.zip |
Move lldb/test to lldb/packages/Python/lldbsuite/test.
This is the conclusion of an effort to get LLDB's Python code
structured into a bona-fide Python package. This has a number
of benefits, but most notably the ability to more easily share
Python code between different but related pieces of LLDB's Python
infrastructure (for example, `scripts` can now share code with
`test`).
llvm-svn: 251532
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py new file mode 100644 index 00000000000..c48119c8c0b --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py @@ -0,0 +1,77 @@ +""" +Test lldb-mi -file-xxx commands. +""" + +from __future__ import print_function + +import use_lldb_suite + +import lldbmi_testcase +from lldbtest import * + +class MiFileTestCase(lldbmi_testcase.MiTestCaseBase): + + mydir = TestBase.compute_mydir(__file__) + + @skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows + @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + def test_lldbmi_file_exec_and_symbols_file(self): + """Test that 'lldb-mi --interpreter' works for -file-exec-and-symbols exe.""" + + self.spawnLldbMi(args = None) + + # Test that -file-exec-and-symbols works for filename + self.runCmd("-file-exec-and-symbols %s" % self.myexe) + self.expect("\^done") + + # Run + self.runCmd("-exec-run") + self.expect("\^running") + self.expect("\*stopped,reason=\"exited-normally\"") + + @skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows + @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + def test_lldbmi_file_exec_and_symbols_absolute_path(self): + """Test that 'lldb-mi --interpreter' works for -file-exec-and-symbols fullpath/exe.""" + + self.spawnLldbMi(args = None) + + # Test that -file-exec-and-symbols works for absolute path + import os + path = os.path.join(os.getcwd(), self.myexe) + self.runCmd("-file-exec-and-symbols \"%s\"" % path) + self.expect("\^done") + + # Run + self.runCmd("-exec-run") + self.expect("\^running") + self.expect("\*stopped,reason=\"exited-normally\"") + + @skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows + @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + def test_lldbmi_file_exec_and_symbols_relative_path(self): + """Test that 'lldb-mi --interpreter' works for -file-exec-and-symbols relpath/exe.""" + + self.spawnLldbMi(args = None) + + # Test that -file-exec-and-symbols works for relative path + path = "./%s" % self.myexe + self.runCmd("-file-exec-and-symbols %s" % path) + self.expect("\^done") + + # Run + self.runCmd("-exec-run") + self.expect("\^running") + self.expect("\*stopped,reason=\"exited-normally\"") + + @skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows + @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + def test_lldbmi_file_exec_and_symbols_unknown_path(self): + """Test that 'lldb-mi --interpreter' works for -file-exec-and-symbols badpath/exe.""" + + self.spawnLldbMi(args = None) + + # Test that -file-exec-and-symbols fails on unknown path + path = "unknown_dir/%s" % self.myexe + self.runCmd("-file-exec-and-symbols %s" % path) + self.expect("\^error") |