-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSHARP-5788: Replace cake with dotnet cli scripts #1832
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR replaces the Cake build system with dotnet CLI scripts, simplifying the build and test infrastructure by removing Cake dependencies and consolidating test execution into shell scripts.
Key changes:
- Replaced Cake-based build scripts with a new
execute-tests.shscript that uses dotnet CLI directly - Removed conditional
ADD_NET10_TFMlogic and madenet10.0a standard target framework - Consolidated test execution across all test scripts to use the new
execute-tests.shscript
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/SmokeTests/MongoDB.Driver.SmokeTests.Sdk/MongoDB.Driver.SmokeTests.Sdk.csproj | Added net10.0 as a permanent target framework |
| tests/BuildProps/Tests.Build.props | Added net10.0 as a permanent target framework, removed conditional logic |
| evergreen/run-unit-tests.sh | Replaced direct dotnet test invocation with execute-tests.sh script call |
| evergreen/run-tests.sh | Removed Cake build invocations, replaced with execute-tests.sh script call |
| evergreen/run-smoke-tests.sh | Replaced direct dotnet test invocation with execute-tests.sh script call |
| evergreen/run-plain-auth-tests.sh | Replaced Cake build invocation with execute-tests.sh script call |
| evergreen/run-mongodb-oidc-tests.sh | Replaced Cake build invocation with execute-tests.sh script call |
| evergreen/run-mongodb-aws-test.sh | Replaced Cake build invocation with execute-tests.sh script call |
| evergreen/run-mongodb-aws-ecs-test.sh | Replaced Cake build invocation with execute-tests.sh script call, reorganized script flow |
| evergreen/run-load-balancer-tests.sh | Replaced Cake build invocation with execute-tests.sh script call |
| evergreen/run-gssapi-auth-tests.sh | Replaced Cake build invocation with execute-tests.sh script call, unified Windows/Unix paths |
| evergreen/run-csfle-gcp-tests.sh | Replaced Cake build invocation with execute-tests.sh script call |
| evergreen/run-csfle-azure-tests.sh | Replaced Cake build invocation with execute-tests.sh script call |
| evergreen/run-atlas-search-test.sh | Replaced Cake build invocation with execute-tests.sh script call |
| evergreen/run-atlas-search-index-helpers-test.sh | Replaced Cake build invocation with execute-tests.sh script call |
| evergreen/run-atlas-connectivity-tests.sh | Replaced Cake build invocation with execute-tests.sh script call, removed temp variable setup |
| evergreen/execute-tests.sh | New script that consolidates test execution logic using dotnet CLI |
| evergreen/evergreen.yml | Updated test configuration to use TEST_CATEGORY environment variables instead of Cake targets |
| build.sh | Removed Cake build script for Unix systems |
| build.ps1 | Removed Cake build script for Windows systems |
| build.config | Removed Cake version configuration |
| build.cake | Removed Cake build definition file |
| GitVersion.yml | Removed GitVersion configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fi | ||
|
|
||
| for file in $TEST_PROJECT_PATH; do | ||
| dotnet test "${file}" -c Release --no-build ${FILTER_PARAMETER} ${FRAMEWORK_PARAMETER} --results-directory ./build/test-results --logger "junit;verbosity=detailed;LogFileName=TEST-{assembly}.xml;FailureBodyFormat=Verbose" --logger "console;verbosity=detailed" |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shell parameter expansion without quotes can cause word splitting issues. The ${FILTER_PARAMETER} and ${FRAMEWORK_PARAMETER} variables contain quoted strings with spaces, but they need to be passed through eval or properly handled to preserve the quotes. Consider using an array to build the command arguments or using eval to properly handle the quoted parameters.
| dotnet test "${file}" -c Release --no-build ${FILTER_PARAMETER} ${FRAMEWORK_PARAMETER} --results-directory ./build/test-results --logger "junit;verbosity=detailed;LogFileName=TEST-{assembly}.xml;FailureBodyFormat=Verbose" --logger "console;verbosity=detailed" | |
| cmd=(dotnet test "${file}" -c Release --no-build) | |
| if [[ -n "${FILTER_PARAMETER}" ]]; then | |
| # Use eval to expand the quoted filter parameter correctly | |
| eval "cmd+=( ${FILTER_PARAMETER} )" | |
| fi | |
| if [[ -n "${FRAMEWORK_PARAMETER}" ]]; then | |
| eval "cmd+=( ${FRAMEWORK_PARAMETER} )" | |
| fi | |
| cmd+=(--results-directory ./build/test-results --logger "junit;verbosity=detailed;LogFileName=TEST-{assembly}.xml;FailureBodyFormat=Verbose" --logger "console;verbosity=detailed") | |
| "${cmd[@]}" |
No description provided.