Skip to content

Commit 9b40dc7

Browse files
committed
Update MTP build/test config and MSBuild imports
Added direct test execution for MTP unit/validation tests in build.yml. Switched MSBuild imports in coverlet.MTP.props/targets to MTP-specific files. Disabled NuGet package validation and added (commented) analyzer config options in coverlet.MTP.csproj for future use. No functional code changes.
1 parent b68b79a commit 9b40dc7

File tree

6 files changed

+20
-6
lines changed

6 files changed

+20
-6
lines changed

eng/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ steps:
3939
displayName: Pack
4040

4141
- script: |
42+
artifacts\bin\coverlet.MTP.unit.tests\debug\coverlet.MTP.unit.tests.exe --diagnostic --diagnostic-verbosity $(BuildConfiguration) --report-xunit-trx --report-xunit-trx-filename "coverlet.MTP.unit.tests.trx" --diagnostic --diagnostic-output-directory "$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)"
43+
artifacts\bin\coverlet.MTP.validation.tests\debug\coverlet.MTP.validation.tests.exe --diagnostic --diagnostic-verbosity $(BuildConfiguration) --report-xunit-trx --report-xunit-trx-filename "coverlet.MTP.validation.tests.trx" --diagnostic --diagnostic-output-directory "$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)"
4244
dotnet test test/coverlet.core.tests/coverlet.core.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.core.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" --diag:"$(Build.SourcesDirectory)/artifacts/log/coverlet.core.tests.diag.$(BuildConfiguration).log;tracelevel=verbose"
4345
dotnet test test/coverlet.core.coverage.tests/coverlet.core.coverage.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.core.coverage.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory "$(Build.SourcesDirectory))/artifacts/reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.core.coverage.tests.trx" --diagnostic-verbosity debug --diagnostic --diagnostic-output-directory "$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)"
4446
dotnet test test/coverlet.msbuild.tasks.tests\coverlet.msbuild.tasks.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.msbuild.tasks.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" --diag:"$(Build.SourcesDirectory)/artifacts/log/coverlet.msbuild.tasks.tests.diag.$(BuildConfiguration).log;tracelevel=verbose"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<Project>
2-
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\coverlet.props" />
2+
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\coverlet.MTP.props" />
33
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<Project>
2-
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\coverlet.targets" />
2+
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\coverlet.MTP.targets" />
33
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<Project>
2-
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\coverlet.props" />
2+
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\coverlet.MTP.props" />
33
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<Project>
2-
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\coverlet.targets" />
2+
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\coverlet.MTP.targets" />
33
</Project>

src/coverlet.MTP/coverlet.MTP.csproj

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,22 @@
1212

1313
<SuppressDependenciesWhenPacking>false</SuppressDependenciesWhenPacking>
1414
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);CopyProjectReferencesToPackage</TargetsForTfmSpecificContentInPackage>
15-
15+
1616
<EnablePackageValidation>false</EnablePackageValidation>
1717
<!--<IsTestProject>true</IsTestProject>-->
1818
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
1919
<IsPackable>true</IsPackable>
2020
<NoPackageAnalysis>true</NoPackageAnalysis>
2121
<!-- disable transitive version update and use versions defined in coverlet.core -->
2222
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
23+
<!-- settings for Muse.coverlet.MTP.globalconfig -->
24+
<!-- <CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
25+
<AnalysisMode>Recommended</AnalysisMode>
26+
<AnalysisLevel>latest-major</AnalysisLevel>
27+
<Deterministic>true</Deterministic>
28+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
29+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
30+
<EmbedUntrackedSources>true</EmbedUntrackedSources> -->
2331
</PropertyGroup>
2432

2533
<PropertyGroup>
@@ -56,6 +64,10 @@
5664
<ProjectReference Include="$(MSBuildThisFileDirectory)..\coverlet.core\coverlet.core.csproj" PrivateAssets="all" />
5765
</ItemGroup>
5866

67+
<!-- <ItemGroup>
68+
<GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)../contentFiles/any/any/Muse.coverlet.MTP.globalconfig" />
69+
</ItemGroup> -->
70+
5971
<!-- NuGet package layout -->
6072
<!-- NuGet folders https://learn.microsoft.com/nuget/create-packages/creating-a-package#from-a-convention-based-working-directory -->
6173
<ItemGroup>
@@ -91,6 +103,6 @@
91103
<!-- Print batches for debug purposes -->
92104
<Message Text="Batch for .nupkg: ReferenceCopyLocalPaths = @(_ReferenceCopyLocalPaths), ReferenceCopyLocalPaths.DestinationSubDirectory = %(_ReferenceCopyLocalPaths.DestinationSubDirectory) Filename = %(_ReferenceCopyLocalPaths.Filename) Extension = %(_ReferenceCopyLocalPaths.Extension)" Importance="High" Condition="'@(_ReferenceCopyLocalPaths)' != ''" />
93105

94-
</Target>
106+
</Target>
95107

96108
</Project>

0 commit comments

Comments
 (0)