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

chore(CTestDriver): skip project building according to cmake.buildBeforeRun config #4241

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Dabsunter
Copy link

@Dabsunter Dabsunter commented Jan 15, 2025

This change addresses item #3919

This changes auto-build behavior when launching/debugging tests from the test explorer view.

The following changes are proposed in the CTest driver:

  • Skip project building if cmake.buildBeforeRun is set to false (true by default, meaning the default installation will keep the current behavior)

The purpose of this change

Sometime during debugging sessions, we might want to run/debug tests multiple time without any code change, and those unnecessary re-build steps can be very time consuming in big projects.

Having the auto-build feature on by default is fine, but we should be able to disable it.

Other Notes/Information

I relied on the already existing cmake.buildBeforeRun config, but we could introduce a dedicated cmake.ctest.buildBeforeTest to give the user more granularity in their choice...

Copy link
Collaborator

@gcampbell-msft gcampbell-msft left a comment

Choose a reason for hiding this comment

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

I agree with your assessment that it could also be useful to have a more granular test setting for this, but I think that for now, this should work, we can always make it more granular later.

Approved.

@gcampbell-msft gcampbell-msft enabled auto-merge (squash) January 16, 2025 17:36
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.

2 participants