Skip to content
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

Add tests for the Swift snippets workflows #1126

Merged
merged 13 commits into from
Dec 11, 2024
Merged

Conversation

award999
Copy link
Contributor

@award999 award999 commented Oct 7, 2024

  • Created some common utilities for dealing with debug sessions
  • Add integration test for run command and debug variant, big difference
    being whether the breakpoint is hit or not

Issue: #1125

@michael-weng
Copy link
Contributor

The CI will probably make this apparent so might just be stating the obvious here, but snippet's only implemented in 5.7 so probably need to set some precondition.
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0356-swift-snippets.md

@award999
Copy link
Contributor Author

award999 commented Oct 8, 2024

The CI will probably make this apparent so might just be stating the obvious here, but snippet's only implemented in 5.7 so probably need to set some precondition. https://github.com/swiftlang/swift-evolution/blob/main/proposals/0356-swift-snippets.md

yep thanks :), also seems like it was hidden behind an experimental flag for a bit so trying to run that down

@michael-weng
Copy link
Contributor

The CI will probably make this apparent so might just be stating the obvious here, but snippet's only implemented in 5.7 so probably need to set some precondition. https://github.com/swiftlang/swift-evolution/blob/main/proposals/0356-swift-snippets.md

yep thanks :), also seems like it was hidden behind an experimental flag for a bit so trying to run that down

Nice! If it's a particular flag we are expecting would be a good candidate for a separate contract test, and if anything were to change we will know explicit the contract with the driver's broken.

src/SwiftSnippets.ts Outdated Show resolved Hide resolved
michael-weng added a commit to michael-weng/vscode-swift that referenced this pull request Oct 31, 2024
- Added comments for clarification
- Added utilities to listen for dap message, this is useful for test
synchronization. Code takes inspiration from
swiftlang#1126
michael-weng added a commit to michael-weng/vscode-swift that referenced this pull request Oct 31, 2024
- Added comments for clarification
- Added utilities to listen for dap message, this is useful for test
synchronization. Code takes inspiration from
swiftlang#1126
michael-weng added a commit to michael-weng/vscode-swift that referenced this pull request Nov 4, 2024
- Added comments for clarification
- Added utilities to listen for dap message, this is useful for test
synchronization. Code takes inspiration from
swiftlang#1126
michael-weng added a commit to michael-weng/vscode-swift that referenced this pull request Nov 5, 2024
- Added comments for clarification
- Added utilities to listen for dap message, this is useful for test
synchronization. Code takes inspiration from
swiftlang#1126
award999 pushed a commit that referenced this pull request Nov 8, 2024
* Add integration tests for build commands

- Validate the workflow of user calling the
Swift: Run Build/Clean Build/Debug Build commands.
- Ensure Swift: Run Build will not get blocked by pre-set breakpoint.
- Ensure Swift: Clean Build will result in a cleaned up .build folder.
- Ensure Swift: Debug Build will stop on a breakpoint and resume.

Issue: #1184

* - Added module enum for workbench commands string constant
- Added comments for clarification
- Added utilities to listen for dap message, this is useful for test
synchronization. Code takes inspiration from
#1126

* - Rename from utilies/command.ts to utilies/commands.ts
- Minor cosmetic change to utilies/commands.ts

* - Fix a bug in updateSettings where promise is not being exlicitly
returned, causing restore of setting being not awaitable
- Make makeDebugConfigurations to be awaitable
- Change launch to also update the key for ASLR disable settings
- Make the test properly set up and reset the settings that update the
launch config
@award999 award999 force-pushed the snippets branch 2 times, most recently from 424d339 to 16ffb37 Compare December 10, 2024 16:45
test/integration-tests/SwiftSnippet.test.ts Outdated Show resolved Hide resolved
test/utilities/debug.ts Outdated Show resolved Hide resolved
test/utilities/debug.ts Outdated Show resolved Hide resolved
* Created some common utilities for dealing with debug sessions
* Add integration test for run command and debug variant, big difference
  being whether the breakpoint is hit or not

Issue: swiftlang#1125
CodeLLDB is not working with older toolchains so need to use lldb-dap
@award999 award999 merged commit e3ade90 into swiftlang:main Dec 11, 2024
15 checks passed
@award999 award999 deleted the snippets branch December 11, 2024 13:41
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