-
Notifications
You must be signed in to change notification settings - Fork 344
[lldb] Run async tests using back-deployment target #3490
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
base: stable/20210726
Are you sure you want to change the base?
[lldb] Run async tests using back-deployment target #3490
Conversation
@swift-ci test |
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.
Thanks, this is great! I have a couple of questions inside.
def test_backdeploy(self): | ||
"""Test function arguments in async functions""" | ||
self.build(dictionary={ | ||
'TARGET_SWIFTFLAGS': f'-target {self.getArchitecture()}-apple-macos11' |
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.
This is the first time I'm seeing these nifty format string literals. Are they supported by all python versions that LLDB can build under?
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.
I'll get rid of these. I forgot that f-strings are Python 3.6+, not all versions of Python 3.
@skipIf(oslist=['windows', 'linux']) | ||
def test_backdeploy(self): | ||
"""Test function arguments in async functions""" | ||
self.build(dictionary={ |
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.
Maybe add a comment here that the first macOS to natively support async was macos12?
@swiftTest | ||
@skipIfWindows | ||
@skipIfLinux | ||
@skipIf(archs=no_match(["arm64", "arm64e", "arm64_32", "x86_64"])) |
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.
Why is this necessary? It sounds like this basically excludes i386-apple-macos11, which I think isn't a thing?
On the other hand we may need to @skipDarwinEmbedded
since the triple explictly asks for macos.
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.
I'll review and fix these. You're no doubt right. I duplicated the existing function and kept its decorations without looking closely at them.
def test_actor_backdeploy(self): | ||
"""Test async unwind""" | ||
self.build(dictionary={ | ||
'TARGET_SWIFTFLAGS': f'-target {self.getArchitecture()}-apple-macos11' |
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.
I'm curious if this is better than using SWIFTFLAGS_EXTRAS
. Are the makefiles themselves defining SWIFTFLAGS_EXTRAS?
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.
Yes the Makefiles are defining SWIFTFLAGS_EXTRAS
. I believe it didn't work when I tried. I can double check.
For each of the async tests, extract the test body into a function (in some cases this already existed), and then duplicate each
test*
function to a*_backdeploy
test. The back-deploy tests build formacos11
, which is a back deployment target.