forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 368
[lldb] Discern embedded swift tests that can't run vs buggy ones #13545
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
Open
augusto2112
wants to merge
2
commits into
swiftlang:stable/21.x
Choose a base branch
from
augusto2112:embedded-decorator-change
base: stable/21.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1085,12 +1085,36 @@ def decorate(func): | |
| return decorate | ||
|
|
||
| def skipEmbeddedSwift(func): | ||
| """Skip a test that ought to work in embedded Swift but currently doesn't. | ||
| Use this when the test's inferior builds and runs as embedded Swift and the | ||
| debugger is what gets the wrong answer -- i.e. a gap in LLDB's embedded | ||
| support that is expected to be closed. For a test whose own source cannot be | ||
| compiled as embedded Swift at all, use `requiresNonEmbeddedSwift` instead so | ||
| the two populations stay distinguishable. | ||
| """ | ||
| def skip_fn(swift_embedded=None, **kwargs): | ||
| if swift_embedded == "swiftembed": | ||
| return "not supported in embedded Swift" | ||
| return None | ||
| return _skipForVariant("swift_embedded", skip_fn, func) | ||
|
|
||
| def requiresNonEmbeddedSwift(func): | ||
| """Skip a test whose own source requires non-embedded Swift. | ||
| Behaves exactly like `skipEmbeddedSwift`; the separate name records that the | ||
| test cannot run as embedded Swift because the inferior does not compile in | ||
| that mode -- it imports Foundation or another ObjC module, enables library | ||
| evolution, uses `_Concurrency`, or relies on a language feature Embedded | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isnt' there concurrency support in embedded Swift? |
||
| Swift rejects. Nothing in LLDB can make these pass, so they should not be | ||
| counted against embedded debugging support. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Last sentence is unclear. |
||
| """ | ||
| def skip_fn(swift_embedded=None, **kwargs): | ||
| if swift_embedded == "swiftembed": | ||
| return "test requires non-embedded Swift" | ||
| return None | ||
| return _skipForVariant("swift_embedded", skip_fn, func) | ||
|
|
||
| def skipEmbeddedSwiftOnLinux(func): | ||
| def skip_fn(swift_embedded=None, **kwargs): | ||
| if swift_embedded == "swiftembed" and lldbplatformutil.getPlatform() == "linux": | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(), decorators=[skipEmbeddedSwift, swiftTest]) | ||
| lldbinline.MakeInlineTest(__file__, globals(), decorators=[requiresNonEmbeddedSwift, swiftTest]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lldb/test/API/lang/swift/archetype_resolution_subclass/TestArchetypeResolutionSubclass.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(), decorators=[skipEmbeddedSwift, swiftTest]) | ||
| lldbinline.MakeInlineTest(__file__, globals(), decorators=[requiresNonEmbeddedSwift, swiftTest]) |
2 changes: 1 addition & 1 deletion
2
lldb/test/API/lang/swift/array_bridged_enum/TestArrayBridgedEnum.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import lldbsuite.test.lldbinline as lldbinline | ||
| from lldbsuite.test.decorators import * | ||
|
|
||
| lldbinline.MakeInlineTest(__file__, globals(), decorators=[skipEmbeddedSwift, | ||
| lldbinline.MakeInlineTest(__file__, globals(), decorators=[requiresNonEmbeddedSwift, | ||
| swiftTest, skipUnlessFoundation]) |
2 changes: 1 addition & 1 deletion
2
lldb/test/API/lang/swift/array_element/TestSwiftArrayElement.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(), decorators=[skipEmbeddedSwift, swiftTest]) | ||
| lldbinline.MakeInlineTest(__file__, globals(), decorators=[requiresNonEmbeddedSwift, swiftTest]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(), decorators=[skipEmbeddedSwift, swiftTest]) | ||
| lldbinline.MakeInlineTest(__file__, globals(), decorators=[requiresNonEmbeddedSwift, swiftTest]) |
2 changes: 1 addition & 1 deletion
2
lldb/test/API/lang/swift/array_tuple_resilient/TestSwiftArrayTupleResilient.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import lldbsuite.test.lldbinline as lldbinline | ||
| from lldbsuite.test.decorators import * | ||
|
|
||
| lldbinline.MakeInlineTest(__file__, globals(), decorators=[skipEmbeddedSwift, | ||
| lldbinline.MakeInlineTest(__file__, globals(), decorators=[requiresNonEmbeddedSwift, | ||
| swiftTest, skipUnlessDarwin, | ||
| expectedFailureAll(archs=['arm64_32'], bugnumber="<rdar://problem/58065423>")]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
second half of this sentence reads weird