Skip to content

Make testcase more robust #4032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def build(self):
# This test needs a working Remote Mirrors implementation.
@skipIf(oslist=['windows'])
def test_dwarf_importer(self):
lldb.SBDebugger.MemoryPressureDetected()
self.runCmd("settings set symbols.use-swift-dwarfimporter true")
self.build()
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
self, 'break here', lldb.SBFileSpec('main.swift'))
Expand All @@ -63,17 +61,12 @@ def test_dwarf_importer(self):
# substrs=["(DoubleLongUnion)", "long_val = 42"])
self.expect("target variable fromSubmodule",
substrs=["(FromSubmodule)", "x = 1", "y = 2", "z = 3"])
process.Clear()
target.Clear()
lldb.SBDebugger.MemoryPressureDetected()

@skipIf(archs=['ppc64le'], bugnumber='SR-10214')
@swiftTest
# This test needs a working Remote Mirrors implementation.
@skipIf(oslist=['windows'])
def test_dwarf_importer_exprs(self):
lldb.SBDebugger.MemoryPressureDetected()
self.runCmd("settings set symbols.use-swift-dwarfimporter true")
self.build()
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
self, 'break here', lldb.SBFileSpec('main.swift'))
Expand All @@ -95,15 +88,12 @@ def test_dwarf_importer_exprs(self):
self.expect("expr union", substrs=["(DoubleLongUnion)", "long_val = 42"])
self.expect("expr fromSubmodule",
substrs=["(FromSubmodule)", "x = 1", "y = 2", "z = 3"])
process.Clear()
target.Clear()
lldb.SBDebugger.MemoryPressureDetected()

@skipIf(archs=['ppc64le'], bugnumber='SR-10214')
@swiftTest
@skipIf(setting=('symbols.use-swift-clangimporter', 'false'))
def test_negative(self):
lldb.SBDebugger.MemoryPressureDetected()
self.runCmd("log enable lldb types")
self.runCmd("settings set symbols.use-swift-dwarfimporter false")
self.build()
log = self.getBuildArtifact("types.log")
Expand All @@ -114,9 +104,7 @@ def test_negative(self):
# target.FindFirstGlobalVariable("point"),
# typename="Point", num_children=2)
# This can't be resolved.
lldbutil.check_variable(self,
target.FindFirstGlobalVariable("swiftStructCMember"),
num_children=0)
self.expect("expr swiftStructCMember", error=True)

found = False
import io
Expand Down