[lldb][tests] Automatically call compute_mydir (NFC)

Eliminate boilerplate of having each test manually assign to `mydir` by calling
`compute_mydir` in lldbtest.py.

Differential Revision: https://reviews.llvm.org/D128077
This commit is contained in:
Dave Lee 2022-06-16 17:38:47 -07:00
parent 303c4c37ea
commit 4cc8f2a017
958 changed files with 4 additions and 1862 deletions

View File

@ -33,9 +33,7 @@ to the Python test suite under the current 'test' directory.
./command_source/TestCommandSource.py provides a simple example of test case ./command_source/TestCommandSource.py provides a simple example of test case
which overrides lldbtest.TestBase to exercise the lldb's 'command source' which overrides lldbtest.TestBase to exercise the lldb's 'command source'
command. The subclass should override the attribute 'mydir' in order for the command.
runtime to locate the individual test cases when running as part of a large
test suite or when running each test case as a separate Python invocation.
The doc string provides more details about the setup required for running a The doc string provides more details about the setup required for running a
test case on its own. To run the whole test suite, 'dotest.py' is all you test case on its own. To run the whole test suite, 'dotest.py' is all you

View File

@ -4,10 +4,6 @@ LLDB module which provides the abstract base class of lldb test case.
The concrete subclass can override lldbtest.TestBase in order to inherit the The concrete subclass can override lldbtest.TestBase in order to inherit the
common behavior for unitest.TestCase.setUp/tearDown implemented in this file. common behavior for unitest.TestCase.setUp/tearDown implemented in this file.
The subclass should override the attribute mydir in order for the python runtime
to locate the individual test cases when running as part of a large test suite
or when running each test case as a separate python invocation.
./dotest.py provides a test driver which sets up the environment to run the ./dotest.py provides a test driver which sets up the environment to run the
entire of part of the test suite . Example: entire of part of the test suite . Example:
@ -539,7 +535,9 @@ class Base(unittest2.TestCase):
Do current directory manipulation. Do current directory manipulation.
""" """
# Fail fast if 'mydir' attribute is not overridden. # Fail fast if 'mydir' attribute is not overridden.
if not cls.mydir or len(cls.mydir) == 0: if not cls.mydir:
cls.mydir = Base.compute_mydir(sys.modules[cls.__module__].__file__)
if not cls.mydir:
raise Exception("Subclasses must override the 'mydir' attribute.") raise Exception("Subclasses must override the 'mydir' attribute.")
# Save old working directory. # Save old working directory.
@ -1703,11 +1701,6 @@ class TestBase(Base):
Important things for test class writers: Important things for test class writers:
- Overwrite the mydir class attribute, otherwise your test class won't
run. It specifies the relative directory to the top level 'test' so
the test harness can change to the correct working directory before
running your test.
- The setUp method sets up things to facilitate subsequent interactions - The setUp method sets up things to facilitate subsequent interactions
with the debugger as part of the test. These include: with the debugger as part of the test. These include:
- populate the test method name - populate the test method name

View File

@ -11,8 +11,6 @@ from lldbsuite.test import lldbutil
class DefaultCacheLineSizeTestCase(TestBase): class DefaultCacheLineSizeTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
@skipUnlessTargetAndroid @skipUnlessTargetAndroid

View File

@ -12,8 +12,6 @@ from lldbsuite.test import lldbutil
class SBDirCheckerCase(TestBase): class SBDirCheckerCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def setUp(self): def setUp(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestSBCommandReturnObject(TestBase): class TestSBCommandReturnObject(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
@skipIfNoSBHeaders @skipIfNoSBHeaders

View File

@ -10,8 +10,6 @@ from lldbsuite.test import lldbutil
import six import six
class ListenToModuleLoadedEvents (TestBase): class ListenToModuleLoadedEvents (TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test_clearing_listener(self): def test_clearing_listener(self):

View File

@ -11,8 +11,6 @@ from lldbsuite.test.lldbtest import *
class APILogTestCase(TestBase): class APILogTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test_api_log(self): def test_api_log(self):

View File

@ -13,8 +13,6 @@ from lldbsuite.test import lldbutil
class TestMultipleSimultaneousDebuggers(TestBase): class TestMultipleSimultaneousDebuggers(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
@skipIfNoSBHeaders @skipIfNoSBHeaders

View File

@ -12,8 +12,6 @@ from lldbsuite.test import lldbutil
class TestMultipleTargets(TestBase): class TestMultipleTargets(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
@skipIf(oslist=["linux"], archs=["arm", "aarch64"]) @skipIf(oslist=["linux"], archs=["arm", "aarch64"])

View File

@ -25,8 +25,6 @@ class SBBreakpointCallbackCase(TestBase):
self.generateSource('test_listener_resume.cpp') self.generateSource('test_listener_resume.cpp')
self.generateSource('test_stop-hook.cpp') self.generateSource('test_stop-hook.cpp')
mydir = TestBase.compute_mydir(__file__)
@skipIfRemote @skipIfRemote
@skipIfNoSBHeaders @skipIfNoSBHeaders
# clang-cl does not support throw or catch (llvm.org/pr24538) # clang-cl does not support throw or catch (llvm.org/pr24538)

View File

@ -11,8 +11,6 @@ from lldbsuite.test import lldbutil
class TestBreakpointIt(TestBase): class TestBreakpointIt(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
@skipIf(archs=no_match(["arm"])) @skipIf(archs=no_match(["arm"]))

View File

@ -12,8 +12,6 @@ from lldbsuite.test import lldbutil
class TestBreakpointThumbCodesection(TestBase): class TestBreakpointThumbCodesection(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIf(archs=no_match(["arm"])) @skipIf(archs=no_match(["arm"]))
@skipIf(archs=["arm64"]) @skipIf(archs=["arm64"])
@skipIfDarwinEmbedded # codegen on darwin always defaults to thumb for armv7/armv7k targets @skipIfDarwinEmbedded # codegen on darwin always defaults to thumb for armv7/armv7k targets

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class ARMEmulationTestCase(TestBase): class ARMEmulationTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test @no_debug_info_test
def test_thumb_emulations(self): def test_thumb_emulations(self):
test_dir = os.path.join(self.getSourceDir(), "new-test-files") test_dir = os.path.join(self.getSourceDir(), "new-test-files")

View File

@ -11,8 +11,6 @@ from textwrap import dedent
class AssertMessagesTestCase(TestBase): class AssertMessagesTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def assert_expect_fails_with(self, cmd, expect_args, expected_msg): def assert_expect_fails_with(self, cmd, expect_args, expected_msg):

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class TestBenchmarkContinue(BenchBase): class TestBenchmarkContinue(BenchBase):
mydir = TestBase.compute_mydir(__file__)
@benchmarks_test @benchmarks_test
def test_run_command(self): def test_run_command(self):
"""Benchmark different ways to continue a process""" """Benchmark different ways to continue a process"""

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class ExpressionEvaluationCase(BenchBase): class ExpressionEvaluationCase(BenchBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
BenchBase.setUp(self) BenchBase.setUp(self)
self.source = 'main.cpp' self.source = 'main.cpp'

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class RepeatedExprsCase(BenchBase): class RepeatedExprsCase(BenchBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
BenchBase.setUp(self) BenchBase.setUp(self)
self.source = 'main.cpp' self.source = 'main.cpp'

View File

@ -13,8 +13,6 @@ from lldbsuite.test.lldbbench import *
class FrameVariableResponseBench(BenchBase): class FrameVariableResponseBench(BenchBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
BenchBase.setUp(self) BenchBase.setUp(self)
self.exe = lldbtest_config.lldbExec self.exe = lldbtest_config.lldbExec

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class TestBenchmarkLibcxxList(BenchBase): class TestBenchmarkLibcxxList(BenchBase):
mydir = TestBase.compute_mydir(__file__)
@benchmarks_test @benchmarks_test
def test_run_command(self): def test_run_command(self):
"""Benchmark the std::list data formatter (libc++)""" """Benchmark the std::list data formatter (libc++)"""

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class TestBenchmarkLibcxxMap(BenchBase): class TestBenchmarkLibcxxMap(BenchBase):
mydir = TestBase.compute_mydir(__file__)
@benchmarks_test @benchmarks_test
def test_run_command(self): def test_run_command(self):
"""Benchmark the std::map data formatter (libc++)""" """Benchmark the std::map data formatter (libc++)"""

View File

@ -13,8 +13,6 @@ from lldbsuite.test.lldbbench import *
class StartupDelaysBench(BenchBase): class StartupDelaysBench(BenchBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
BenchBase.setUp(self) BenchBase.setUp(self)
# Create self.stopwatch2 for measuring "set first breakpoint". # Create self.stopwatch2 for measuring "set first breakpoint".

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class SteppingSpeedBench(BenchBase): class SteppingSpeedBench(BenchBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
BenchBase.setUp(self) BenchBase.setUp(self)
self.exe = lldbtest_config.lldbExec self.exe = lldbtest_config.lldbExec

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class CompileRunToBreakpointBench(BenchBase): class CompileRunToBreakpointBench(BenchBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
BenchBase.setUp(self) BenchBase.setUp(self)
self.exe = lldbtest_config.lldbExec self.exe = lldbtest_config.lldbExec

View File

@ -13,8 +13,6 @@ from lldbsuite.test import lldbutil
@skipUnlessDarwin @skipUnlessDarwin
class AddDsymCommandCase(TestBase): class AddDsymCommandCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
TestBase.setUp(self) TestBase.setUp(self)
self.template = 'main.cpp.template' self.template = 'main.cpp.template'

View File

@ -4,8 +4,6 @@ from lldbsuite.test.decorators import *
class AproposTestCase(TestBase): class AproposTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test @no_debug_info_test
def test_apropos(self): def test_apropos(self):
self.expect("apropos", error=True, self.expect("apropos", error=True,

View File

@ -10,8 +10,6 @@ import lldbsuite.test.lldbutil as lldbutil
class AproposWithProcessTestCase(TestBase): class AproposWithProcessTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def setUp(self): def setUp(self):

View File

@ -8,8 +8,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test @no_debug_info_test
def test_list_commands(self): def test_list_commands(self):
src_dir = self.getSourceDir() src_dir = self.getSourceDir()

View File

@ -5,8 +5,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test @no_debug_info_test
def test_error(self): def test_error(self):
self.expect("breakpoint set --func-regex (", error=True, self.expect("breakpoint set --func-regex (", error=True,

View File

@ -10,8 +10,6 @@ from lldbsuite.test.lldbtest import *
class TestCmdContainer(TestBase): class TestCmdContainer(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test_container_add(self): def test_container_add(self):

View File

@ -4,8 +4,6 @@ from lldbsuite.test.decorators import *
class DeleteCommandTestCase(TestBase): class DeleteCommandTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test @no_debug_info_test
def test_delete_builtin(self): def test_delete_builtin(self):
self.expect("command delete settings", error=True, self.expect("command delete settings", error=True,

View File

@ -4,8 +4,6 @@ from lldbsuite.test.decorators import *
class InvalidArgsCommandTestCase(TestBase): class InvalidArgsCommandTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test @no_debug_info_test
def test_script_add(self): def test_script_add(self):
self.expect("command script add 1 2", error=True, self.expect("command script add 1 2", error=True,

View File

@ -10,8 +10,6 @@ import lldbsuite.test.lldbutil as lldbutil
class NestedAliasTestCase(TestBase): class NestedAliasTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def setUp(self): def setUp(self):

View File

@ -10,8 +10,6 @@ from lldbsuite.test.lldbtest import *
class TestCommandRegexParsing(TestBase): class TestCommandRegexParsing(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test_sample_rename_this(self): def test_sample_rename_this(self):

View File

@ -10,8 +10,6 @@ from lldbsuite.test.lldbtest import *
class CmdPythonTestCase(TestBase): class CmdPythonTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test(self): def test(self):

View File

@ -10,8 +10,6 @@ from lldbsuite.test import lldbutil
class ImportTestCase(TestBase): class ImportTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(['pyapi']) @add_test_categories(['pyapi'])
@no_debug_info_test @no_debug_info_test
def test_import_command(self): def test_import_command(self):

View File

@ -10,8 +10,6 @@ from lldbsuite.test import lldbutil
class Rdar12586188TestCase(TestBase): class Rdar12586188TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(['pyapi']) @add_test_categories(['pyapi'])
@no_debug_info_test @no_debug_info_test
def test_rdar12586188_command(self): def test_rdar12586188_command(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test.lldbtest import *
class CommandScriptAliasTestCase(TestBase): class CommandScriptAliasTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test_pycmd(self): def test_pycmd(self):

View File

@ -12,8 +12,6 @@ from lldbsuite.test import lldbutil
class CommandSourceTestCase(TestBase): class CommandSourceTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test @no_debug_info_test
def test_command_source(self): def test_command_source(self):
"""Test that lldb command "command source" works correctly.""" """Test that lldb command "command source" works correctly."""

View File

@ -11,8 +11,6 @@ from lldbsuite.test import lldbutil
class DisassemblyTestCase(TestBase): class DisassemblyTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test(self): def test(self):

View File

@ -11,8 +11,6 @@ from lldbsuite.test.lldbtest import *
class FrameDisassembleTestCase(TestBase): class FrameDisassembleTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test_frame_disassemble(self): def test_frame_disassemble(self):

View File

@ -13,7 +13,6 @@ from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil from lldbsuite.test import lldbutil
class TestExprLookupAnonStructTypedef(TestBase): class TestExprLookupAnonStructTypedef(TestBase):
mydir = TestBase.compute_mydir(__file__)
@expectedFailureAll( @expectedFailureAll(
oslist=['linux'], oslist=['linux'],

View File

@ -17,8 +17,6 @@ from lldbsuite.test import lldbutil
class TestArgumentPassingRestrictions(TestBase): class TestArgumentPassingRestrictions(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIf(compiler="clang", compiler_version=['<', '7.0']) @skipIf(compiler="clang", compiler_version=['<', '7.0'])
def test_argument_passing_restrictions(self): def test_argument_passing_restrictions(self):
self.build() self.build()

View File

@ -11,8 +11,6 @@ from lldbsuite.test import lldbutil
class TestCalculatorMode(TestBase): class TestCalculatorMode(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test__calculator_mode(self): def test__calculator_mode(self):

View File

@ -12,8 +12,6 @@ from lldbsuite.test import lldbutil
class ExprCommandCallBuiltinFunction(TestBase): class ExprCommandCallBuiltinFunction(TestBase):
mydir = TestBase.compute_mydir(__file__)
# Builtins are expanded by Clang, so debug info shouldn't matter. # Builtins are expanded by Clang, so debug info shouldn't matter.
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class ExprCommandCallFunctionTestCase(TestBase): class ExprCommandCallFunctionTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@expectedFailureAll( @expectedFailureAll(
compiler="icc", compiler="icc",
bugnumber="llvm.org/pr14437, fails with ICC 13.1") bugnumber="llvm.org/pr14437, fails with ICC 13.1")

View File

@ -8,8 +8,6 @@ from lldbsuite.test import lldbutil
class ExprCommandCallStopContinueTestCase(TestBase): class ExprCommandCallStopContinueTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
# Call super's setUp(). # Call super's setUp().
TestBase.setUp(self) TestBase.setUp(self)

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class ExprCommandCallUserDefinedFunction(TestBase): class ExprCommandCallUserDefinedFunction(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test(self): def test(self):
"""Test return values of user defined function calls.""" """Test return values of user defined function calls."""
self.build() self.build()

View File

@ -11,8 +11,6 @@ from lldbsuite.test import lldbutil
class ExprCommandThatRestartsTestCase(TestBase): class ExprCommandThatRestartsTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def setUp(self): def setUp(self):

View File

@ -12,8 +12,6 @@ from lldbsuite.test import lldbutil
class ExprCommandWithThrowTestCase(TestBase): class ExprCommandWithThrowTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
# Call super's setUp(). # Call super's setUp().
TestBase.setUp(self) TestBase.setUp(self)

View File

@ -11,8 +11,6 @@ from lldbsuite.test import lldbutil
class TestCastIntToAnonymousEnum(TestBase): class TestCastIntToAnonymousEnum(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test_cast_int_to_anonymous_enum(self): def test_cast_int_to_anonymous_enum(self):
self.build() self.build()

View File

@ -5,8 +5,6 @@ from lldbsuite.test import lldbutil
class ExprCharTestCase(TestBase): class ExprCharTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def do_test(self, dictionary=None): def do_test(self, dictionary=None):
"""These basic expression commands should work as expected.""" """These basic expression commands should work as expected."""
self.build(dictionary=dictionary) self.build(dictionary=dictionary)

View File

@ -12,8 +12,6 @@ from lldbsuite.test import lldbutil
class TestClassTemplateSpecializationParametersHandling(TestBase): class TestClassTemplateSpecializationParametersHandling(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test_class_template_specialization(self): def test_class_template_specialization(self):
self.build() self.build()

View File

@ -5,8 +5,6 @@ from lldbsuite.test import lldbutil
class TestImportDefinitionArrayType(TestBase): class TestImportDefinitionArrayType(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test(self): def test(self):
self.build() self.build()
lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.cpp")) lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.cpp"))

View File

@ -5,8 +5,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIf # rdar://problem/53931074 @skipIf # rdar://problem/53931074
def test(self): def test(self):
self.build() self.build()

View File

@ -11,8 +11,6 @@ from lldbsuite.test import lldbutil
class CommandLineExprCompletionTestCase(TestBase): class CommandLineExprCompletionTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test_expr_completion(self): def test_expr_completion(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test.lldbtest import *
class ContextObjectObjcTestCase(TestBase): class ContextObjectObjcTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["objc"]) @add_test_categories(["objc"])
def test_context_object_objc(self): def test_context_object_objc(self):
"""Tests expression evaluation in context of an objc class.""" """Tests expression evaluation in context of an objc class."""

View File

@ -8,8 +8,6 @@ from lldbsuite.test.lldbtest import *
class ContextObjectTestCase(TestBase): class ContextObjectTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test_context_object(self): def test_context_object(self):
"""Tests expression evaluation in context of an object.""" """Tests expression evaluation in context of an object."""
self.build() self.build()

View File

@ -9,8 +9,6 @@ from lldbsuite.test.decorators import *
class ExprDiagnosticsTestCase(TestBase): class ExprDiagnosticsTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
# Call super's setUp(). # Call super's setUp().
TestBase.setUp(self) TestBase.setUp(self)

View File

@ -5,8 +5,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@expectedFailureAll(oslist=["windows"]) @expectedFailureAll(oslist=["windows"])
def test(self): def test(self):
self.build() self.build()

View File

@ -11,8 +11,6 @@ from lldbsuite.test.decorators import *
class TestAllowJIT(TestBase): class TestAllowJIT(TestBase):
mydir = TestBase.compute_mydir(__file__)
# If your test case doesn't stress debug info, then # If your test case doesn't stress debug info, then
# set this to true. That way it won't be run once for # set this to true. That way it won't be run once for
# each debug info format. # each debug info format.

View File

@ -8,8 +8,6 @@ from lldbsuite.test.lldbtest import *
class ExprEntryBPTestCase(TestBase): class ExprEntryBPTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True NO_DEBUG_INFO_TESTCASE = True
def test_expr_entry_bp(self): def test_expr_entry_bp(self):

View File

@ -10,8 +10,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test @no_debug_info_test
def test(self): def test(self):
# FIXME: The only reason this test needs to create a real target is because # FIXME: The only reason this test needs to create a real target is because

View File

@ -8,8 +8,6 @@ from lldbsuite.test import lldbutil
class ExprSyscallTestCase(TestBase): class ExprSyscallTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@expectedFailureAll( @expectedFailureAll(
oslist=["windows"], oslist=["windows"],
bugnumber="llvm.org/pr21765, getpid() does not exist on Windows") bugnumber="llvm.org/pr21765, getpid() does not exist on Windows")

View File

@ -10,8 +10,6 @@ from lldbsuite.test import lldbutil
class ExprCommandWithFixits(TestBase): class ExprCommandWithFixits(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test_with_dummy_target(self): def test_with_dummy_target(self):
"""Test calling expressions in the dummy target with errors that can be fixed by the FixIts.""" """Test calling expressions in the dummy target with errors that can be fixed by the FixIts."""

View File

@ -12,8 +12,6 @@ from lldbsuite.test import lldbutil
class ExprFormattersTestCase(TestBase): class ExprFormattersTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self): def setUp(self):
# Call super's setUp(). # Call super's setUp().
TestBase.setUp(self) TestBase.setUp(self)

View File

@ -5,8 +5,6 @@ from lldbsuite.test import lldbutil
class TestFunctionTemplateSpecializationTempArgs(TestBase): class TestFunctionTemplateSpecializationTempArgs(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test_function_template_specialization_temp_args(self): def test_function_template_specialization_temp_args(self):
self.build() self.build()

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class ImportStdModule(TestBase): class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -14,8 +14,6 @@ from lldbsuite.test import lldbutil
class TestImportStdModuleConflicts(TestBase): class TestImportStdModuleConflicts(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestBasicDeque(TestBase): class TestBasicDeque(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestDbgInfoContentDeque(TestBase): class TestDbgInfoContentDeque(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -10,8 +10,6 @@ import os
class ImportStdModule(TestBase): class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
# We only emulate a fake libc++ in this test and don't use the real libc++, # We only emulate a fake libc++ in this test and don't use the real libc++,
# but we still add the libc++ category so that this test is only run in # but we still add the libc++ category so that this test is only run in
# test configurations where libc++ is actually supposed to be tested. # test configurations where libc++ is actually supposed to be tested.

View File

@ -10,8 +10,6 @@ import os
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
# We only emulate a fake libc++ in this test and don't use the real libc++, # We only emulate a fake libc++ in this test and don't use the real libc++,
# but we still add the libc++ category so that this test is only run in # but we still add the libc++ category so that this test is only run in
# test configurations where libc++ is actually supposed to be tested. # test configurations where libc++ is actually supposed to be tested.

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestDbgInfoContentForwardList(TestBase): class TestDbgInfoContentForwardList(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestBasicForwardList(TestBase): class TestBasicForwardList(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -10,8 +10,6 @@ from lldbsuite.test import lldbutil
class TestDbgInfoContentList(TestBase): class TestDbgInfoContentList(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestBasicList(TestBase): class TestBasicList(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -11,8 +11,6 @@ import shutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
# We only emulate a fake libc++ in this test and don't use the real libc++, # We only emulate a fake libc++ in this test and don't use the real libc++,
# but we still add the libc++ category so that this test is only run in # but we still add the libc++ category so that this test is only run in
# test configurations where libc++ is actually supposed to be tested. # test configurations where libc++ is actually supposed to be tested.

View File

@ -14,8 +14,6 @@ import os
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
# We only emulate a fake libc++ in this test and don't use the real libc++, # We only emulate a fake libc++ in this test and don't use the real libc++,
# but we still add the libc++ category so that this test is only run in # but we still add the libc++ category so that this test is only run in
# test configurations where libc++ is actually supposed to be tested. # test configurations where libc++ is actually supposed to be tested.

View File

@ -15,8 +15,6 @@ from lldbsuite.test import lldbutil
class STLTestCase(TestBase): class STLTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -10,8 +10,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
# FIXME: This regressed in 69d5a6662115499198ebfa07a081e98a6ce4b915 # FIXME: This regressed in 69d5a6662115499198ebfa07a081e98a6ce4b915

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestQueue(TestBase): class TestQueue(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -5,8 +5,6 @@ from lldbsuite.test import lldbutil
class TestCase(TestBase): class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestSharedPtrDbgInfoContent(TestBase): class TestSharedPtrDbgInfoContent(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestSharedPtr(TestBase): class TestSharedPtr(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -8,8 +8,6 @@ from lldbsuite.test import lldbutil
class TestStack(TestBase): class TestStack(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
@skipIfLinux # Declaration in some Linux headers causes LLDB to crash. @skipIfLinux # Declaration in some Linux headers causes LLDB to crash.

View File

@ -10,8 +10,6 @@ import os
class ImportStdModule(TestBase): class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
# We only emulate a fake libc++ in this test and don't use the real libc++, # We only emulate a fake libc++ in this test and don't use the real libc++,
# but we still add the libc++ category so that this test is only run in # but we still add the libc++ category so that this test is only run in
# test configurations where libc++ is actually supposed to be tested. # test configurations where libc++ is actually supposed to be tested.

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestUniquePtrDbgInfoContent(TestBase): class TestUniquePtrDbgInfoContent(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
@skipIf(compiler="clang", compiler_version=['<', '9.0']) @skipIf(compiler="clang", compiler_version=['<', '9.0'])

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestUniquePtr(TestBase): class TestUniquePtr(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
@skipIf(compiler="clang", compiler_version=['<', '9.0']) @skipIf(compiler="clang", compiler_version=['<', '9.0'])

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestBoolVector(TestBase): class TestBoolVector(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -10,8 +10,6 @@ from lldbsuite.test import lldbutil
class TestDbgInfoContentVector(TestBase): class TestDbgInfoContentVector(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestVectorOfVectors(TestBase): class TestVectorOfVectors(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestBasicVector(TestBase): class TestBasicVector(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestDbgInfoContentWeakPtr(TestBase): class TestDbgInfoContentWeakPtr(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -9,8 +9,6 @@ from lldbsuite.test import lldbutil
class TestSharedPtr(TestBase): class TestSharedPtr(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"]) @add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang")) @skipIf(compiler=no_match("clang"))
def test(self): def test(self):

View File

@ -12,8 +12,6 @@ from lldbsuite.test import lldbutil
class TestImportBuiltinFileID(TestBase): class TestImportBuiltinFileID(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIfDarwinEmbedded @skipIfDarwinEmbedded
@add_test_categories(["gmodules", "objc"]) @add_test_categories(["gmodules", "objc"])
def test_import_builtin_fileid(self): def test_import_builtin_fileid(self):

View File

@ -10,7 +10,6 @@ from lldbsuite.test import lldbutil
class TestInlineNamespace(TestBase): class TestInlineNamespace(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test(self): def test(self):
self.build() self.build()

View File

@ -4,8 +4,6 @@ from lldbsuite.test.decorators import *
class InvalidArgsExpressionTestCase(TestBase): class InvalidArgsExpressionTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test @no_debug_info_test
def test_invalid_lang(self): def test_invalid_lang(self):
self.expect("expression -l foo --", error=True, self.expect("expression -l foo --", error=True,

Some files were not shown because too many files have changed in this diff Show More