Skip to content
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

[lldb][swift] Add missing swiftTest decorators #1922

Merged
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions lldb/packages/Python/lldbsuite/test/lldbplaygroundrepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def did_crash(self, result):
error = self.get_stream_data(result)
print("Crash Error: {}".format(error))

@swiftTest
def test_playgrounds(self):
# Build
self.build_all()
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/commands/help/TestHelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def test_help_arch(self):
substrs=['arm', 'i386', 'x86_64'])

@no_debug_info_test
@swiftTest # Checks for the Swift version number in the output
def test_help_version(self):
"""Test 'help version' and 'version' commands."""
self.expect("help version",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class MTCSwiftPropertyTestCase(TestBase):
@expectedFailureAll(bugnumber="rdar://60396797",
setting=('symbols.use-swift-clangimporter', 'false'))
@skipUnlessDarwin
@swiftTest
def test(self):
self.mtc_dylib_path = findMainThreadCheckerDylib()
self.assertTrue(self.mtc_dylib_path != "")
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/functionalities/mtc/swift/TestMTCSwift.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class MTCSwiftTestCase(TestBase):
@expectedFailureAll(bugnumber="rdar://60396797",
setting=('symbols.use-swift-clangimporter', 'false'))
@skipUnlessDarwin
@swiftTest
def test(self):
self.mtc_dylib_path = findMainThreadCheckerDylib()
self.assertTrue(self.mtc_dylib_path != "")
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/lang/swift/availability/TestAvailability.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def setUp(self):
# Call super's setUp().
TestBase.setUp(self)

@swiftTest
@skipIf(oslist=['linux', 'windows'])
def testAvailability(self):
platform_name = lldbplatformutil.getPlatform()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SwiftCompletionTest(PExpectTest):
# under ASAN on a loaded machine..
@skipIfAsan
@skipUnlessDarwin
@swiftTest
def test_basic_completion(self):

self.launch(extra_args=["--repl"], executable=None, dimensions=(100,500))
Expand Down Expand Up @@ -41,6 +42,7 @@ def test_basic_completion(self):
# under ASAN on a loaded machine..
@skipIfAsan
@skipIf(oslist=['windows'])
@swiftTest
def test_lldb_command_completion(self):

self.launch(extra_args=["--repl"], executable=None, dimensions=(100,500))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lldbsuite.test.lldbinline as lldbinline
from lldbsuite.test.decorators import *

lldbinline.MakeInlineTest(__file__, globals())
lldbinline.MakeInlineTest(__file__, globals(), decorators=[swiftTest])
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def run_tests(self, target, process):
# FIXME: this is formatted incorrectly.
self.expect("fr var t", substrs=["(T)"]) #, "world"])

@swiftTest
@skipIf(oslist=['windows'])
@skipIf(debug_info=no_match(["dwarf"]))
@expectedFailureAll(archs=["arm64", "arm64e", 'arm64_32'], bugnumber="<rdar://problem/58096919>")
Expand All @@ -47,6 +48,7 @@ def test_missing_module(self):
target, process, _, _ = lldbutil.run_to_name_breakpoint(self, 'main')
self.run_tests(target, process)

@swiftTest
@skipIf(oslist=['windows'])
@skipIf(debug_info=no_match(["dwarf"]))
@expectedFailureAll(archs=["arm64", "arm64e", 'arm64_32'], bugnumber="<rdar://problem/58096919>")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lldbsuite.test.lldbinline as lldbinline
from lldbsuite.test.decorators import *

lldbinline.MakeInlineTest(__file__, globals())
lldbinline.MakeInlineTest(__file__, globals(), decorators=[swiftTest])
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class TestExpressionErrors(TestBase):

mydir = TestBase.compute_mydir(__file__)

@swiftTest
def test_CanThrowError(self):
"""Tests that swift expressions resolve scoped variables correctly"""
self.build()
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/lang/swift/missing_sdk/TestMissingSDK.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def setUp(self):
# Call super's setUp().
TestBase.setUp(self)

@swiftTest
@skipIf(oslist=['windows'])
@skipIfDarwinEmbedded # swift crash inspecting swift stdlib with little other swift loaded <rdar://problem/55079456>
def testMissingSDK(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ class TestObjCIVarDiscovery(TestBase):

@skipUnlessDarwin
@skipIf(debug_info=no_match("dsym"))
@swiftTest
def test_nodbg(self):
self.build()
shutil.rmtree(self.getBuildArtifact("aTestFramework.framework/Versions/A/aTestFramework.dSYM"))
self.do_test(False)

@skipUnlessDarwin
@skipIf(debug_info=no_match("dsym"))
@swiftTest
def test_dbg(self):
self.build()
self.do_test(True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def setUp(self):
TestBase.setUp(self)

@skipUnlessDarwin
@swiftTest
def test_private_import(self):
"""Test a library with a private import for which there is no debug info"""
invisible_swift = self.getBuildArtifact("Invisible.swift")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lldbsuite.test.lldbinline as lldbinline
from lldbsuite.test.decorators import *

lldbinline.MakeInlineTest(__file__, globals())
lldbinline.MakeInlineTest(__file__, globals(), decorators=[swiftTest])
3 changes: 2 additions & 1 deletion lldb/test/API/repl/array/TestREPLArray.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import lldbsuite.test.lldbinrepl as lldbinrepl
import lldbsuite.test.lldbtest as lldbtest
from lldbsuite.test.decorators import *

lldbinrepl.MakeREPLTest(__file__, globals(), [])
lldbinrepl.MakeREPLTest(__file__, globals(), decorators=[swiftTest])
2 changes: 2 additions & 0 deletions lldb/test/API/repl/cpp_exceptions/TestCPPExceptionsInREPL.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ class TestREPLExceptions(TestBase):
NO_DEBUG_INFO_TESTCASE = True

@decorators.skipUnlessDarwin
@decorators.swiftTest
def test_set_repl_mode_exceptions(self):
""" Test that SetREPLMode turns off trapping exceptions."""
self.build()
self.main_source_file = lldb.SBFileSpec("main.swift")
self.do_repl_mode_test()

@decorators.skipUnlessDarwin
@decorators.swiftTest
def test_repl_exceptions(self):
""" Test the lldb --repl turns off trapping exceptions."""
self.build()
Expand Down