Skip to content

[lldb][swift] Only run Swift Shell tests when Swift support is enabled #1893

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

Teemperor
Copy link

Disabling Swift support in LLDB doesn't prevent the test suite from running
the Swift tests (which then end up failing instead of being marked as
unsupported). This adds a lit feature for Swift and adds the REQUIRES to all
Swift tests to mark them as unsupported if Swift is disabled.

@Teemperor Teemperor force-pushed the RunSwiftShellTestsOnlyWhenSwiftEnabled branch from fa87cc1 to 56bf89e Compare October 1, 2020 11:48
@Teemperor
Copy link
Author

@swift-ci test

@@ -174,6 +174,12 @@ llvm_canonicalize_cmake_booleans(
LLVM_ENABLE_SHARED_LIBS
LLDB_IS_64_BITS)

# BEGIN SWIFT
llvm_canonicalize_cmake_booleans(

Choose a reason for hiding this comment

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

why isn't this conditional on having swift support enabled?
Ah.. this is the code that declares LLDB_ENABLE_SWIFT_SUPPORT? My CMake is not very good.

Copy link
Author

@Teemperor Teemperor Oct 1, 2020

Choose a reason for hiding this comment

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

The GitHub diff doesn't show enough context above this change to get the context, but this code (and the one above) is 'canonicalizing' the bool variable so that we can use it in the lit.site.cfg.py.in file (it essentially just turns all the different strings CMake interprets as True or False into 1 and 0 respectively so that we can write the value into the Python file). Without that our config file would be turn the line config.lldb_enable_swift = @LLDB_ENABLE_SWIFT_SUPPORT@ to config.lldb_enable_swift = Off (as Off is a legit 'false' value in CMake) and then Python would ask 'what does Off mean'? With this line the config file instead gets config.lldb_enable_swift = 0 which Python understands.

@Teemperor
Copy link
Author

@swift-ci test

@Teemperor Teemperor force-pushed the RunSwiftShellTestsOnlyWhenSwiftEnabled branch from 56bf89e to 6413046 Compare October 2, 2020 09:15
@Teemperor
Copy link
Author

@swift-ci test

@Teemperor
Copy link
Author

(Seems like BreakpointSimple.test had a line number hardcoded so the REQUIRES broke it)

@Teemperor
Copy link
Author

@swift-ci test

@Teemperor Teemperor force-pushed the RunSwiftShellTestsOnlyWhenSwiftEnabled branch from 6413046 to 745710b Compare October 2, 2020 16:47
@Teemperor Teemperor changed the title [lldb][swift] Only run Swift API tests when Swift support is enabled [lldb][swift] Only run Swift Shell tests when Swift support is enabled Oct 2, 2020
@Teemperor
Copy link
Author

@swift-ci test

@Teemperor
Copy link
Author

swift-ci test platform macos

@Teemperor
Copy link
Author

@swift-ci test platform macos

Disabling Swift support in LLDB doesn't prevent the test suite from running
the Swift tests (which then end up failing instead of being marked as
unsupported). This adds a lit feature for Swift and adds the REQUIRES to all
Swift tests to mark them as unsupported if Swift is disabled.
@Teemperor Teemperor force-pushed the RunSwiftShellTestsOnlyWhenSwiftEnabled branch from 745710b to 779364a Compare October 6, 2020 07:14
@Teemperor
Copy link
Author

@swift-ci test platform macos

@Teemperor
Copy link
Author

@swift-ci please test

@Teemperor
Copy link
Author

@swift-ci test

@shahmishal shahmishal merged commit 9a14690 into swiftlang:swift/main Oct 7, 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.

5 participants