diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-09-01 09:12:37 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-09-01 09:12:37 +0000 |
commit | 29872606d220420d53fde7cc5e3bea15f8da62e7 (patch) | |
tree | 47d7a82ccea48a6dd10a2d8ecb6b3c3127724131 /lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest | |
parent | adfdcb9c2652aeee585b9005fd6c67be06af8ea9 (diff) | |
download | bcm5719-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/move_nearest')
5 files changed, 0 insertions, 93 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile deleted file mode 100644 index 06ef85cf908..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -LEVEL = ../../../make - -DYLIB_NAME := foo -DYLIB_CXX_SOURCES := foo.cpp -CXX_SOURCES := main.cpp - -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/TestMoveNearest.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/TestMoveNearest.py deleted file mode 100644 index b8281e9c85b..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/TestMoveNearest.py +++ /dev/null @@ -1,69 +0,0 @@ -from __future__ import print_function - - -import unittest2 -import lldb -from lldbsuite.test.lldbtest import * -import lldbsuite.test.lldbutil as lldbutil - - -class TestMoveNearest(TestBase): - - mydir = TestBase.compute_mydir(__file__) - NO_DEBUG_INFO_TESTCASE = True - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - # Find the line number to break inside main(). - self.line1 = line_number('foo.h', '// !BR1') - self.line2 = line_number('foo.h', '// !BR2') - self.line_between = line_number('main.cpp', "// BR_Between") - print("BR_Between found at", self.line_between) - self.line_main = line_number('main.cpp', '// !BR_main') - - def test(self): - """Test target.move-to-nearest logic""" - - self.build() - target = self.dbg.CreateTarget(self.getBuildArtifact("a.out")) - self.assertTrue(target, VALID_TARGET) - - lldbutil.run_break_set_by_symbol(self, 'main', sym_exact=True) - environment = self.registerSharedLibrariesWithTarget(target, ["foo"]) - process = target.LaunchSimple(None, environment, self.get_process_working_directory()) - self.assertEquals(process.GetState(), lldb.eStateStopped) - - # Regardless of the -m value the breakpoint should have exactly one - # location on the foo functions - self.runCmd("settings set target.move-to-nearest-code true") - lldbutil.run_break_set_by_file_and_line(self, 'foo.h', self.line1, - loc_exact=True, extra_options="-m 1") - lldbutil.run_break_set_by_file_and_line(self, 'foo.h', self.line2, - loc_exact=True, extra_options="-m 1") - - self.runCmd("settings set target.move-to-nearest-code false") - lldbutil.run_break_set_by_file_and_line(self, 'foo.h', self.line1, - loc_exact=True, extra_options="-m 0") - lldbutil.run_break_set_by_file_and_line(self, 'foo.h', self.line2, - loc_exact=True, extra_options="-m 0") - - - # Make sure we set a breakpoint in main with -m 1 for various lines in - # the function declaration - # "int" - lldbutil.run_break_set_by_file_and_line(self, 'main.cpp', - self.line_main-1, extra_options="-m 1") - # "main()" - lldbutil.run_break_set_by_file_and_line(self, 'main.cpp', - self.line_main, extra_options="-m 1") - # "{" - lldbutil.run_break_set_by_file_and_line(self, 'main.cpp', - self.line_main+1, extra_options="-m 1") - # "return .." - lldbutil.run_break_set_by_file_and_line(self, 'main.cpp', - self.line_main+2, extra_options="-m 1") - - # Make sure we don't put move the breakpoint if it is set between two functions: - lldbutil.run_break_set_by_file_and_line(self, 'main.cpp', - self.line_between, extra_options="-m 1", num_expected_locations=0) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.cpp deleted file mode 100644 index 8dad0a23f36..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "foo.h" - -int call_foo1() { return foo1(); } diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.h b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.h deleted file mode 100644 index 9f0e56dd22e..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.h +++ /dev/null @@ -1,5 +0,0 @@ -inline int foo1() { return 1; } // !BR1 - -inline int foo2() { return 2; } // !BR2 - -LLDB_TEST_API extern int call_foo1(); diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/main.cpp deleted file mode 100644 index 76a22a5420f..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/main.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "foo.h" - -int call_foo2() { return foo2(); } -// BR_Between -int -main() // !BR_main -{ - return call_foo1() + call_foo2(); -} |