Skip to content

[test] Mark tests unsupported on all Linux flavors #1090

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

Conversation

modocache
Copy link
Contributor

Autolinking was added to the frontend in 22912bc. It was disabled on Linux in 198402d, and further constrained to be disabled on "linux-gnu" in 83b4384. Since then, more flavors of Linux have become supported by Swift: "linux-gnueabihf" in 4bf81e0, and "freebsd" in f41b791.

Autolinking most likely does not work on any of these platforms, so mark it as unsupported for now.


Why this test is not supported on Linux is beyond my depth. Advice on how to support this test in the future would be greatly appreciated!

/cc @hpux735

@gribozavr
Copy link
Contributor

That's because Linux uses a different autolinking mechanism, based on swift-autolink-extract.

@gribozavr
Copy link
Contributor

@modocache Could you add that as a comment to the test near the lines that disable it? It would help future maintainers.

@hpux735
Copy link
Contributor

hpux735 commented Jan 25, 2016

Nice work! I just finished running the test suite on linux-gnueabihf and it works as expected.

@modocache modocache force-pushed the serialization-autolinking-unsupported-oses branch from 6d4677d to b7db0b8 Compare January 25, 2016 14:24
@modocache
Copy link
Contributor Author

@gribozavr Updated! Thanks for the advice.

It might be useful to expand test/lit.cfg to make it easier to disable tests on all non-Darwin machines. Perhaps something like REQUIRES: OS=darwin?

@hpux735
Copy link
Contributor

hpux735 commented Jan 25, 2016

I noticed a few more similar cases, and added your fix to them.

wdillon@tegra-ubuntu:~/swift$ ack-grep "UNSUPPORTED: OS=linux-gnu"
test/Interpreter/repl_autolinking.swift
10:// UNSUPPORTED: OS=linux-gnu
11:// UNSUPPORTED: OS=linux-gnueabihf

test/ClangModules/autolinking.swift
14:// UNSUPPORTED: OS=linux-gnu
15:// UNSUPPORTED: OS=linux-gnueabihf

test/Serialization/autolinking.swift
23:// UNSUPPORTED: OS=linux-gnu
24:// UNSUPPORTED: OS=linux-gnueabihf

test/Frontend/embed-bitcode.swift
7:// UNSUPPORTED: OS=linux-gnu
8:// UNSUPPORTED: OS=linux-gnueabihf

test/DebugInfo/ASTSection_ObjC.swift
14:// UNSUPPORTED: OS=linux-gnu
15:// UNSUPPORTED: OS=linux-gnueabihf

Adding these brings the failing tests on arm-linux+gold to 9.

@modocache
Copy link
Contributor Author

@hpux735 Awesome! test/ClangModules/autolinking.swift and test/DebugInfo/ASTSection_ObjC.swift were failing for me on linux-androideabi. Adding those brings me down to 11 failing tests. Would you like to send a pull request for the other files?

@modocache
Copy link
Contributor Author

It seems like test/DebugInfo/ASTSection_ObjC.swift should have REQUIRES: objc_interop, though. I suppose it's intended to work on any system that supports Objective-C.

@hpux735
Copy link
Contributor

hpux735 commented Jan 25, 2016

If you need me to, I can send you a PR. However, my repos are in a state of chaos, so it's probably easier for you to do it, if you don't mind.

@modocache
Copy link
Contributor Author

Can do! 👍

@gribozavr
Copy link
Contributor

Well, it is not strictly dependent on Objective-C interop. It depends on platforms that support autolinking through LLVM. For example, MSVC linker also supports autolinking. I don't know if LLVM can provide the autolinking information in appropriate format.

Autolinking was added to the frontend in 22912bc. It was disabled on
Linux in 198402d, and further constrained to be disabled on "linux-gnu"
in 83b4384. Since then, more flavors of Linux have become supported
by Swift: "linux-gnueabihf" in 4bf81e0, and "freebsd" in f41b791.

Autolinking most likely does not work on any of these platforms, so
mark it as unsupported for now.

Other tests that only mark "linux-gnu" as unsupported do so for similar
reasons. Ensure unsupported tests for "linux-gnu" are also unsupported
on similar platforms.
@modocache modocache force-pushed the serialization-autolinking-unsupported-oses branch from b7db0b8 to 2eb028b Compare January 25, 2016 16:58
@modocache modocache changed the title [test] Disable autolinking tests on Linux flavors [test] Mark tests unsupported on all Linux flavors Jan 25, 2016
@modocache
Copy link
Contributor Author

@gribozavr I amended the commit to incorporate @hpux735's suggestions. It turns out I had already marked ASTSection_ObjC.swift as REQUIRES: objc_interop, though. 😉 326e01b

gribozavr added a commit that referenced this pull request Jan 25, 2016
…upported-oses

[test] Mark tests unsupported on all Linux flavors
@gribozavr gribozavr merged commit 5a951f9 into swiftlang:master Jan 25, 2016
@modocache modocache deleted the serialization-autolinking-unsupported-oses branch January 25, 2016 17:28
@modocache
Copy link
Contributor Author

Thanks!

modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 9, 2016
modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 9, 2016
These tests should be disabled on all flavors of Linux,
not just 'linux-gnu'. See discussion in
swiftlang#1090 (comment).
modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 19, 2016
modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 19, 2016
These tests should be disabled on all flavors of Linux,
not just 'linux-gnu'. See discussion in
swiftlang#1090 (comment).
modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 22, 2016
modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 22, 2016
These tests should be disabled on all flavors of Linux,
not just 'linux-gnu'. See discussion in
swiftlang#1090 (comment).
modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 23, 2016
modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 23, 2016
These tests should be disabled on all flavors of Linux,
not just 'linux-gnu'. See discussion in
swiftlang#1090 (comment).
modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 25, 2016
modocache added a commit to SwiftAndroid/swift that referenced this pull request Feb 25, 2016
These tests should be disabled on all flavors of Linux,
not just 'linux-gnu'. See discussion in
swiftlang#1090 (comment).
MaxDesiatov pushed a commit to MaxDesiatov/swift that referenced this pull request Jun 5, 2020
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.

3 participants