Skip to content

Add test debugging tests #1111

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 6 commits into from
Oct 11, 2024
Merged

Conversation

plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Oct 1, 2024

Adds new tests that test using the debug adapter in the toolchain to run a test, as well as a test that uses CodeLLDB.

This required some new test utilities to set application settings at the start of a test and then set them back to their original value after each test.

@plemarquand plemarquand marked this pull request as draft October 1, 2024 13:22
@plemarquand plemarquand force-pushed the debugging-tests-2 branch 19 times, most recently from 81e83a3 to 1df0f5c Compare October 7, 2024 18:49
@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

1 similar comment
@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

@@ -39,7 +39,6 @@ module.exports = defineConfig({
invert: isFastTestRun,
slow: 10000
},
installExtensions: ["vadimcn.vscode-lldb"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is redundant due to the extensionDependencies defined in package.json

@plemarquand plemarquand marked this pull request as ready for review October 7, 2024 20:06
@plemarquand plemarquand marked this pull request as draft October 7, 2024 20:11
@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

1 similar comment
@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

6 similar comments
@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

@plemarquand plemarquand marked this pull request as ready for review October 8, 2024 15:18
@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

1 similar comment
@plemarquand
Copy link
Contributor Author

@swift-server-bot test this please

Copy link
Contributor

@award999 award999 left a comment

Choose a reason for hiding this comment

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

Adds new tests that test using the debug adapter in the toolchain to run a test, as well as a test that uses CodeLLDB

where are the new tests? Seems to just be updating existing ones

});
};

const changeMonitor = vscode.workspace.onDidChangeConfiguration(event => {
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the change from the user perspective? This seems to do more than just add new tests, I guess mostly just enabling us to switch debuggers during a test run?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes a bug. Changing the debug adapter didn't require a restart of the extension. When you changed the debug adapter nothing re-registered the adapter/loggingDebugAdapter.

Copy link
Contributor Author

@plemarquand plemarquand Oct 10, 2024

Choose a reason for hiding this comment

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

It was uncovered by the tests since they did need to switch the debug adapter without restarting the extension

Copy link
Contributor

Choose a reason for hiding this comment

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

Changing the debug adapter didn't require a restart of the extension

do you mean changing did require a restart?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@award999 I mean it did require a restart, but there was no dialog that popped up prompting a restart.

@plemarquand
Copy link
Contributor Author

@award999
Copy link
Contributor

@plemarquand
Copy link
Contributor Author

@award999 GitHub did that thing where if the diff is too big it doesn't show the file and you have to click Load Diff. Such an annoyance.

});
};

const changeMonitor = vscode.workspace.onDidChangeConfiguration(event => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing the debug adapter didn't require a restart of the extension

do you mean changing did require a restart?

Adds two new tests that test using the debug adapter in the toolchain to run
a test, as well as a test that uses CodeLLDB.

This required some new test utilities to set application settings at the
start of a test and then set them back to their original value after
each test.

- Fixes up an issue where the LD_LIBRARY_PATH was not set for lldb on
  linux.
- Fixes up an issue where when switching the useDebugAdapterInToolchain
  setting the loggingDebugAdapter wasn't reconfigured
@plemarquand plemarquand merged commit ae6ecd5 into swiftlang:main Oct 11, 2024
8 checks passed
@plemarquand plemarquand deleted the debugging-tests-2 branch October 11, 2024 14:47
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