Skip to content

Commit 7669e9d

Browse files
authored
Merge pull request #1922 from Teemperor/AddMissingSwiftDecorators
[lldb][swift] Add missing swiftTest decorators
2 parents f9c85c8 + bd1dd36 commit 7669e9d

File tree

16 files changed

+21
-4
lines changed

16 files changed

+21
-4
lines changed

lldb/packages/Python/lldbsuite/test/lldbplaygroundrepl.py

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def did_crash(self, result):
129129
error = self.get_stream_data(result)
130130
print("Crash Error: {}".format(error))
131131

132+
@swiftTest
132133
def test_playgrounds(self):
133134
# Build
134135
self.build_all()

lldb/test/API/commands/help/TestHelp.py

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def test_help_arch(self):
8181
substrs=['arm', 'i386', 'x86_64'])
8282

8383
@no_debug_info_test
84+
@swiftTest # Checks for the Swift version number in the output
8485
def test_help_version(self):
8586
"""Test 'help version' and 'version' commands."""
8687
self.expect("help version",

lldb/test/API/functionalities/mtc/swift-property/TestMTCSwiftProperty.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class MTCSwiftPropertyTestCase(TestBase):
1919
@expectedFailureAll(bugnumber="rdar://60396797",
2020
setting=('symbols.use-swift-clangimporter', 'false'))
2121
@skipUnlessDarwin
22+
@swiftTest
2223
def test(self):
2324
self.mtc_dylib_path = findMainThreadCheckerDylib()
2425
self.assertTrue(self.mtc_dylib_path != "")

lldb/test/API/functionalities/mtc/swift/TestMTCSwift.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class MTCSwiftTestCase(TestBase):
1919
@expectedFailureAll(bugnumber="rdar://60396797",
2020
setting=('symbols.use-swift-clangimporter', 'false'))
2121
@skipUnlessDarwin
22+
@swiftTest
2223
def test(self):
2324
self.mtc_dylib_path = findMainThreadCheckerDylib()
2425
self.assertTrue(self.mtc_dylib_path != "")

lldb/test/API/lang/swift/availability/TestAvailability.py

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def setUp(self):
4141
# Call super's setUp().
4242
TestBase.setUp(self)
4343

44+
@swiftTest
4445
@skipIf(oslist=['linux', 'windows'])
4546
def testAvailability(self):
4647
platform_name = lldbplatformutil.getPlatform()

lldb/test/API/lang/swift/completion/TestSwiftREPLCompletion.py

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class SwiftCompletionTest(PExpectTest):
1212
# under ASAN on a loaded machine..
1313
@skipIfAsan
1414
@skipUnlessDarwin
15+
@swiftTest
1516
def test_basic_completion(self):
1617

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

4648
self.launch(extra_args=["--repl"], executable=None, dimensions=(100,500))
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import lldbsuite.test.lldbinline as lldbinline
22
from lldbsuite.test.decorators import *
33

4-
lldbinline.MakeInlineTest(__file__, globals())
4+
lldbinline.MakeInlineTest(__file__, globals(), decorators=[swiftTest])

lldb/test/API/lang/swift/deserialization_failure/TestSwiftDeserializationFailure.py

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def run_tests(self, target, process):
3737
# FIXME: this is formatted incorrectly.
3838
self.expect("fr var t", substrs=["(T)"]) #, "world"])
3939

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

51+
@swiftTest
5052
@skipIf(oslist=['windows'])
5153
@skipIf(debug_info=no_match(["dwarf"]))
5254
@expectedFailureAll(archs=["arm64", "arm64e", 'arm64_32'], bugnumber="<rdar://problem/58096919>")
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import lldbsuite.test.lldbinline as lldbinline
22
from lldbsuite.test.decorators import *
33

4-
lldbinline.MakeInlineTest(__file__, globals())
4+
lldbinline.MakeInlineTest(__file__, globals(), decorators=[swiftTest])

lldb/test/API/lang/swift/expression/errors/TestExpressionErrors.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class TestExpressionErrors(TestBase):
2424

2525
mydir = TestBase.compute_mydir(__file__)
2626

27+
@swiftTest
2728
def test_CanThrowError(self):
2829
"""Tests that swift expressions resolve scoped variables correctly"""
2930
self.build()

lldb/test/API/lang/swift/missing_sdk/TestMissingSDK.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def setUp(self):
1919
# Call super's setUp().
2020
TestBase.setUp(self)
2121

22+
@swiftTest
2223
@skipIf(oslist=['windows'])
2324
@skipIfDarwinEmbedded # swift crash inspecting swift stdlib with little other swift loaded <rdar://problem/55079456>
2425
def testMissingSDK(self):

lldb/test/API/lang/swift/objc_runtime_ivars/TestObjCIvarDiscovery.py

+2
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ class TestObjCIVarDiscovery(TestBase):
2828

2929
@skipUnlessDarwin
3030
@skipIf(debug_info=no_match("dsym"))
31+
@swiftTest
3132
def test_nodbg(self):
3233
self.build()
3334
shutil.rmtree(self.getBuildArtifact("aTestFramework.framework/Versions/A/aTestFramework.dSYM"))
3435
self.do_test(False)
3536

3637
@skipUnlessDarwin
3738
@skipIf(debug_info=no_match("dsym"))
39+
@swiftTest
3840
def test_dbg(self):
3941
self.build()
4042
self.do_test(True)

lldb/test/API/lang/swift/private_import/TestSwiftPrivateImport.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def setUp(self):
1111
TestBase.setUp(self)
1212

1313
@skipUnlessDarwin
14+
@swiftTest
1415
def test_private_import(self):
1516
"""Test a library with a private import for which there is no debug info"""
1617
invisible_swift = self.getBuildArtifact("Invisible.swift")
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import lldbsuite.test.lldbinline as lldbinline
22
from lldbsuite.test.decorators import *
33

4-
lldbinline.MakeInlineTest(__file__, globals())
4+
lldbinline.MakeInlineTest(__file__, globals(), decorators=[swiftTest])
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import lldbsuite.test.lldbinrepl as lldbinrepl
22
import lldbsuite.test.lldbtest as lldbtest
3+
from lldbsuite.test.decorators import *
34

4-
lldbinrepl.MakeREPLTest(__file__, globals(), [])
5+
lldbinrepl.MakeREPLTest(__file__, globals(), decorators=[swiftTest])

lldb/test/API/repl/cpp_exceptions/TestCPPExceptionsInREPL.py

+2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ class TestREPLExceptions(TestBase):
2626
NO_DEBUG_INFO_TESTCASE = True
2727

2828
@decorators.skipUnlessDarwin
29+
@decorators.swiftTest
2930
def test_set_repl_mode_exceptions(self):
3031
""" Test that SetREPLMode turns off trapping exceptions."""
3132
self.build()
3233
self.main_source_file = lldb.SBFileSpec("main.swift")
3334
self.do_repl_mode_test()
3435

3536
@decorators.skipUnlessDarwin
37+
@decorators.swiftTest
3638
def test_repl_exceptions(self):
3739
""" Test the lldb --repl turns off trapping exceptions."""
3840
self.build()

0 commit comments

Comments
 (0)