Skip to content

CXX-3179 Set ENABLE_TESTS=OFF by default #1266

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 1 commit into from
Nov 12, 2024

Conversation

eramongodb
Copy link
Contributor

@eramongodb eramongodb commented Nov 11, 2024

Resolves CXX-3179. Verified by this patch.

Changes the default value of ENABLE_TESTS from ON to OFF.

Tweaked descriptions of CMake options to better document how they are conditioned on ENABLE_TESTS=ON (e.g. BUILD_TESTING=ON alone does not enable test targets). In particular, the difference between BUILD_TESTING (add test targets to "all") and ENABLE_TESTS (enable the test targets which may be added to "all") is clarified by the addition of a warning when BUILD_TESTING=ON + ENABLE_TESTS=OFF (which suggests a conflict of intent).

All instances of ENABLE_TESTS=OFF in Evergreen scripts (except in spec.patch) are removed in favor of using off-by-default behavior. All EVG tasks which require test targets or their corresponding build artifacts now explicitly set ENABLE_TESTS=ON (which atm always implies BUILD_TESTING=ON). In short, building test targets is now explicitly opt-in both in CMake configuration and in Evergreen scripts.

@eramongodb eramongodb requested a review from kevinAlbs November 11, 2024 22:33
@eramongodb eramongodb self-assigned this Nov 11, 2024
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

LGTM. I think the updated description for ENABLE_TESTS and new warning helps clarify the difference.

@eramongodb eramongodb merged commit b6bf0a1 into mongodb:master Nov 12, 2024
16 of 19 checks passed
@eramongodb eramongodb deleted the cxx-3179 branch November 12, 2024 17:49
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