Conversation
Add solution filters (TestFx.NoIntegrationTests.slnf and NonWindowsTests.NoIntegrationTests.slnf) that exclude integration test projects and their test assets. Modify azure-pipelines.yml to use ExcludeIntegrationTests property and the new solution filters for Release matrix entries, so that integration tests are only built and run under Debug jobs. Update eng/Build.props to select the appropriate solution filter based on the ExcludeIntegrationTests property. Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
|
@copilot Publish integration tests binlogs step fails on release for all OSes as we don't run the tests |
… excluded The 'Copy binlogs' and 'Publish integration tests binlogs' steps fail on Release jobs because the testsuite binlog directory doesn't exist when integration tests are excluded. Add condition to only run these steps when _ExcludeIntegrationTests is 'false' (Debug builds). Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Fixed in ecc4627. Added |
|
@copilot can you please do a different PR where you explore doing the same functional fix but not by creating more slnf but instead by updating the dotnet test command to use: Filters test modules using file globbing in .NET. Only tests belonging to those test modules will run. For more information and examples on how to use file globbing in .NET, see File globbing. More info at https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-test-mtp |
I'm unable to create new PRs — I can only work within the current PR branch. Would you like me to rework this PR to use the |
|
@copilot ok let's reword this PR then |
… tests in Release Replace the solution filter approach with dotnet test --test-modules glob pattern. For Release builds, runs only unit test modules via: --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" For Debug builds, keeps original test commands unchanged. Removes TestFx.NoIntegrationTests.slnf and NonWindowsTests.NoIntegrationTests.slnf. Reverts eng/Build.props to original (no ExcludeIntegrationTests logic needed). Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Reworked in c6ff763. Replaced the
|
|
@Youssef1313 I was reviewing the tests and I wonder if we should only skip acceptance tests but still run the other integration tests (specifically for MSTest). |
There was a problem hiding this comment.
Pull request overview
Updates the unofficial CI pipeline to avoid running integration tests in Release matrix legs (keeping them in Debug only), reducing redundant work while still running unit test coverage.
Changes:
- Conditioned existing
dotnet teststeps to run only forDebug. - Added
dotnet test --test-modulesinReleaseto execute only unit test assemblies fromartifacts/bin/.... - Conditioned integration-test binlog copy/publish steps to run only for
Debugon Windows/Linux/macOS jobs.
nohwnd
left a comment
There was a problem hiding this comment.
I've spent a minute figuring out why you run the tests twice, hardcoding the config into the paths would make it much easier to see that one step is for debug and other is for release, or at least moving the condition up.
Also do you need to run debug tests at all ?
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Integration tests spawn child processes and run
dotnet buildinternally (already covering both Debug and Release configurations). Running them under both Debug/Release CI matrix entries is redundant—only the test project itself gets rebuilt, not meaningful additional coverage.Changes
azure-pipelines.yml— usesdotnet test --test-moduleswith a glob pattern to run only unit tests in Release builds:dotnet testcommand unchanged (runs all tests including integration)dotnet test --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll"to run only unit test modules, skipping integration testseq(variables._BuildConfig, 'Debug')so they're skipped in ReleaseNo solution filters or
eng/Build.propschanges are needed—the build always compiles the full solution. On Linux/Mac, only DLLs built fromNonWindowsTests.slnfexist inartifacts/bin/, so the glob pattern naturally excludes Windows-only tests as well.The official pipeline (
azure-pipelines-official.yml) is not affected—its Release builds continue running integration tests as the sole configuration.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.