From f7699c31cc7a0d5aa7fb66ab3da639dd2713a4f7 Mon Sep 17 00:00:00 2001 From: Bert Date: Fri, 27 Oct 2023 10:55:43 +0200 Subject: [PATCH] support TargetFrameworks net6.0;net7.0 --- .gitignore | 2 ++ eng/build.yml | 4 ++-- eng/publish-coverlet-result-files.yml | 6 +++--- src/coverlet.msbuild.tasks/coverlet.msbuild.targets | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 542fc1ea3..c606e1a82 100644 --- a/.gitignore +++ b/.gitignore @@ -307,3 +307,5 @@ test/coverlet.integration.determisticbuild/runsettings coverage.cobertura.xml coverage.opencover.xml +coverage.*.cobertura.xml +coverage.*.opencover.xml diff --git a/eng/build.yml b/eng/build.yml index b9f9850b2..13a1b9740 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -27,14 +27,14 @@ steps: **/coverlet.core.tests.csproj **/coverlet.integration.tests.csproj **/coverlet.msbuild.tasks.tests.csproj - arguments: -c $(BuildConfiguration) --no-build -bl:test.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.xunit.extensions]*%2c[coverlet.tests.projectsample]*" --diag:"$(Build.SourcesDirectory)\artifacts\log\$(Configuration)\coverlet.test.diag.log;tracelevel=verbose" + arguments: -c $(BuildConfiguration) --no-build -bl:test.binlog --results-directory:"$(Build.SourcesDirectory)\artifacts\Reports" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.xunit.extensions]*%2c[coverlet.tests.projectsample]*" --diag:"$(Build.SourcesDirectory)\artifacts\log\$(Configuration)\coverlet.test.diag.log;tracelevel=verbose" testRunTitle: $(Agent.JobName) - template: publish-coverlet-result-files.yml - template: publish-coverage-results.yml parameters: - reports: $(Build.SourcesDirectory)/**/coverage.opencover.xml + reports: $(Build.SourcesDirectory)/**/*.opencover.xml condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Debug')) assemblyfilters: '-xunit;-coverlet.testsubject;-Coverlet.Tests.ProjectSample.*' classfilters: '-[coverlet.core.tests.samples.netstandard]*;-[coverlet.tests.xunit.extensions]*' diff --git a/eng/publish-coverlet-result-files.yml b/eng/publish-coverlet-result-files.yml index 11ae17485..93dc6177a 100644 --- a/eng/publish-coverlet-result-files.yml +++ b/eng/publish-coverlet-result-files.yml @@ -8,9 +8,9 @@ steps: Contents: | **/*.trx **/*.html - **/coverage.opencover.xml - **/coverage.cobertura.xml - **/coverage.json + **/*.opencover.xml + **/*.cobertura.xml + **/*.coverage.json **/log.txt **/log.datacollector.*.txt **/log.host.*.txt diff --git a/src/coverlet.msbuild.tasks/coverlet.msbuild.targets b/src/coverlet.msbuild.tasks/coverlet.msbuild.targets index 6a12b2fc3..e8bbfac20 100644 --- a/src/coverlet.msbuild.tasks/coverlet.msbuild.targets +++ b/src/coverlet.msbuild.tasks/coverlet.msbuild.targets @@ -35,7 +35,7 @@ - + - + <_coverletMultiTargetFrameworksCurrentTFM Condition="'$(TargetFrameworks)' != ''" >$(TargetFramework)