From 29872606d220420d53fde7cc5e3bea15f8da62e7 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Sun, 1 Sep 2019 09:12:37 +0000 Subject: [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 --- .../test/expression_command/char/Makefile | 5 -- .../test/expression_command/char/TestExprsChar.py | 67 ---------------------- .../test/expression_command/char/main.cpp | 10 ---- 3 files changed, 82 deletions(-) delete mode 100644 lldb/packages/Python/lldbsuite/test/expression_command/char/Makefile delete mode 100644 lldb/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py delete mode 100644 lldb/packages/Python/lldbsuite/test/expression_command/char/main.cpp (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/char') diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/char/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/char/Makefile deleted file mode 100644 index 8a7102e347a..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/char/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../make - -CXX_SOURCES := main.cpp - -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py b/lldb/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py deleted file mode 100644 index a9679b7dd36..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py +++ /dev/null @@ -1,67 +0,0 @@ -from __future__ import print_function - - -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class ExprCharTestCase(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - self.main_source = "main.cpp" - self.main_source_spec = lldb.SBFileSpec(self.main_source) - - def do_test(self, dictionary=None): - """These basic expression commands should work as expected.""" - self.build(dictionary=dictionary) - - (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, - '// Break here', self.main_source_spec) - frame = thread.GetFrameAtIndex(0) - - value = frame.EvaluateExpression("foo(c)") - self.assertTrue(value.IsValid()) - self.assertTrue(value.GetError().Success()) - self.assertEqual(value.GetValueAsSigned(0), 1) - - value = frame.EvaluateExpression("foo(sc)") - self.assertTrue(value.IsValid()) - self.assertTrue(value.GetError().Success()) - self.assertEqual(value.GetValueAsSigned(0), 2) - - value = frame.EvaluateExpression("foo(uc)") - self.assertTrue(value.IsValid()) - self.assertTrue(value.GetError().Success()) - self.assertEqual(value.GetValueAsSigned(0), 3) - - def test_default_char(self): - self.do_test() - - @expectedFailureAll( - archs=[ - "arm", - "aarch64", - "powerpc64le", - "s390x"], - bugnumber="llvm.org/pr23069") - def test_signed_char(self): - self.do_test(dictionary={'CFLAGS_EXTRAS': '-fsigned-char'}) - - @expectedFailureAll( - archs=[ - "i[3-6]86", - "x86_64", - "arm64", - 'armv7', - 'armv7k'], - bugnumber="llvm.org/pr23069, ") - @expectedFailureAll(triple='mips*', bugnumber="llvm.org/pr23069") - def test_unsigned_char(self): - self.do_test(dictionary={'CFLAGS_EXTRAS': '-funsigned-char'}) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/char/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/char/main.cpp deleted file mode 100644 index c8b0beb1b35..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/char/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -int foo(char c) { return 1; } -int foo(signed char c) { return 2; } -int foo(unsigned char c) { return 3; } - -int main() { - char c = 0; - signed char sc = 0; - unsigned char uc = 0; - return 0; // Break here -} -- cgit v1.2.3