Skip to content

[test] Reinstate CoreGraphics↔︎NSValue bridging tests on iOS/watchOS/tvOS #32515

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 2 commits into from
Jun 30, 2020

Conversation

lorentey
Copy link
Member

This is a followup to #32502, reinstating a Foundation test.

@lorentey
Copy link
Member Author

@swift-ci test

@lorentey lorentey requested review from shahmishal and gribozavr June 23, 2020 21:38
Copy link
Member

@shahmishal shahmishal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@shahmishal
Copy link
Member

Failing Tests (1):
    Swift(windows-x86_64) :: SILGen/dso_handle.swift

cc: @compnerd

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - fbc949c1726fc81b47e8bc77916755183c23b075

@lorentey
Copy link
Member Author

Fascinating!  🤔

17:10:15 [ RUN      ] NSValueBridging.CGRect
17:10:15 stderr>>> 2020-06-23 17:10:15.320 NSValueBridging.swift.gyb.tmp.out[44542:1159733] +[NSValue valueWithCGRect:]: unrecognized selector sent to class 0x14bab18
17:10:15 stderr>>> *** [StdlibUnittest] Terminating due to uncaught exception NSInvalidArgumentException: +[NSValue valueWithCGRect:]: unrecognized selector sent to class 0x14bab18
17:10:15 stderr>>> libc++abi.dylib: terminating with uncaught exception of type NSException
17:10:15 stderr>>> CRASHED: SIGABRT
17:10:15 the test crashed unexpectedly
17:10:15 [     FAIL ] NSValueBridging.CGRect

@lorentey lorentey force-pushed the UIKit-NSValueBridging-tests branch from fbc949c to b3fb762 Compare June 30, 2020 01:44
@lorentey
Copy link
Member Author

The iOS 10.3 simulator predates stable Swift ABI, so it doesn't have the UIKit overlay. Weak linking it fails, and since the executable isn't directly loading the UIKit framework, the method won't be available, either.

The 32-bit simulator tests are deploying the just-built stdlib & in-tree overlays to 10.3, which is not really useful at this point -- only the Swift 5 compatibility runtime will ever get deployed to iOS 10.3 in production, so that's what we should be testing.

@lorentey
Copy link
Member Author

@swift-ci test

@swift-ci

This comment has been minimized.

@swift-ci

This comment has been minimized.

@lorentey lorentey merged commit 4cf4515 into swiftlang:master Jun 30, 2020
@lorentey lorentey deleted the UIKit-NSValueBridging-tests branch June 30, 2020 06:07
@@ -18,11 +18,18 @@
//
// REQUIRES: objc_interop

// The UIKit overlay isn't present on iOS 10.3.
// UNSUPPORTED: CPU=i386
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about other tests that don't depend on UIKit? Could we put these tests into a separate file that does not run on the i386 iOS simulator, while the rest of the test does?

You could also use StdlibUnittest facilities to skip a test on the simulator. See these tests: https://github.com/apple/swift/blob/30ccb529485dac910a8f2a11504205fb5ea16873/validation-test/StdlibUnittest/Common.swift#L153

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense -- I'll submit a followup PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants