summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-09-01 09:12:37 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-09-01 09:12:37 +0000
commit29872606d220420d53fde7cc5e3bea15f8da62e7 (patch)
tree47d7a82ccea48a6dd10a2d8ecb6b3c3127724131 /lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options
parentadfdcb9c2652aeee585b9005fd6c67be06af8ea9 (diff)
downloadbcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.tar.gz
bcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.zip
[lldb] Restructure test folders to match LLDB command hierarchy
Summary: As discussed on lldb-dev, this patch moves some LLDB tests into a hierarchy that more closely resembles the commands we use in the LLDB interpreter. This patch should only move tests that use the command interpreter and shouldn't touch any tests that primarily test the SB API. Reviewers: #lldb, jfb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: dexonsmith, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67033 llvm-svn: 370605
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py114
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/foo.cpp12
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/main.cpp4
4 files changed, 0 insertions, 135 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile
deleted file mode 100644
index 457c4972f2d..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp foo.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
deleted file mode 100644
index 66ec1161d77..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
+++ /dev/null
@@ -1,114 +0,0 @@
-"""
-Test breakpoint command for different options.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class BreakpointOptionsTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def test(self):
- """Test breakpoint command for different options."""
- self.build()
- self.breakpoint_options_test()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.line = line_number('main.cpp', '// Set break point at this line.')
-
- def breakpoint_options_test(self):
- """Test breakpoint command for different options."""
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # This should create a breakpoint with 1 locations.
- lldbutil.run_break_set_by_file_and_line(
- self,
- "main.cpp",
- self.line,
- extra_options="-K 1",
- num_expected_locations=1)
- lldbutil.run_break_set_by_file_and_line(
- self,
- "main.cpp",
- self.line,
- extra_options="-K 0",
- num_expected_locations=1)
-
- # Run the program.
- self.runCmd("run", RUN_SUCCEEDED)
-
- # Stopped once.
- self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
- substrs=["stop reason = breakpoint 2."])
-
- # Check the list of breakpoint.
- self.expect(
- "breakpoint list -f",
- "Breakpoint locations shown correctly",
- substrs=[
- "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
- self.line,
- "2: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
- self.line])
-
- # Continue the program, there should be another stop.
- self.runCmd("process continue")
-
- # Stopped again.
- self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
- substrs=["stop reason = breakpoint 1."])
-
- # Continue the program, we should exit.
- self.runCmd("process continue")
-
- # We should exit.
- self.expect("process status", "Process exited successfully",
- patterns=["^Process [0-9]+ exited with status = 0"])
-
- def breakpoint_options_language_test(self):
- """Test breakpoint command for language option."""
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # This should create a breakpoint with 1 locations.
- lldbutil.run_break_set_by_symbol(
- self,
- 'ns::func',
- sym_exact=False,
- extra_options="-L c++",
- num_expected_locations=1)
-
- # This should create a breakpoint with 0 locations.
- lldbutil.run_break_set_by_symbol(
- self,
- 'ns::func',
- sym_exact=False,
- extra_options="-L c",
- num_expected_locations=0)
- self.runCmd("settings set target.language c")
- lldbutil.run_break_set_by_symbol(
- self, 'ns::func', sym_exact=False, num_expected_locations=0)
-
- # Run the program.
- self.runCmd("run", RUN_SUCCEEDED)
-
- # Stopped once.
- self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
- substrs=["stop reason = breakpoint 1."])
-
- # Continue the program, we should exit.
- self.runCmd("process continue")
-
- # We should exit.
- self.expect("process status", "Process exited successfully",
- patterns=["^Process [0-9]+ exited with status = 0"])
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/foo.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/foo.cpp
deleted file mode 100644
index e5d0e09803e..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/foo.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-
-namespace ns {
- int func(void)
- {
- return 0;
- }
-}
-
-extern "C" int foo(void)
-{
- return ns::func();
-}
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/main.cpp
deleted file mode 100644
index b2e8f523c84..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/main.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-extern "C" int foo(void);
-int main (int argc, char **argv) { // Set break point at this line.
- return foo();
-}
OpenPOWER on IntegriCloud