@@ -85,8 +85,9 @@ private protected void AssertCoverage(string standardOutput = "", string reportN
85
85
86
86
if ( checkDeterministicReport )
87
87
{
88
+ string newName = reportName . Replace ( "json" , "cobertura.xml" ) ;
88
89
// Verify deterministic report
89
- foreach ( string coverageFile in Directory . GetFiles ( GetReportPath ( standardOutput , "coverage.cobertura.xml" ) , "coverage.cobertura.xml" , SearchOption . AllDirectories ) )
90
+ foreach ( string coverageFile in Directory . GetFiles ( GetReportPath ( standardOutput , newName ) , newName , SearchOption . AllDirectories ) )
90
91
{
91
92
Assert . Contains ( "/_/test/coverlet.integration.determisticbuild/DeepThought.cs" , File . ReadAllText ( coverageFile ) ) ;
92
93
File . Delete ( coverageFile ) ;
@@ -117,7 +118,7 @@ public void Msbuild()
117
118
Assert . False ( string . IsNullOrEmpty ( File . ReadAllText ( sourceRootMappingFilePath ) ) ) ;
118
119
Assert . Contains ( "=/_/" , File . ReadAllText ( sourceRootMappingFilePath ) ) ;
119
120
120
- string cmdArgument = $ "test -c { _buildConfiguration } -f { _buildTargetFramework } --no-build /p:CollectCoverage=true /p:CoverletOutput= \" coverage.json \" /p: DeterministicReport=true /p:CoverletOutputFormat=\" cobertura%2cjson\" /p:Include=\" [coverletsample.integration.determisticbuild]*DeepThought\" /p:IncludeTestAssembly=true";
121
+ string cmdArgument = $ "test -c { _buildConfiguration } -f { _buildTargetFramework } --no-build /p:CollectCoverage=true /p:DeterministicReport=true /p:CoverletOutputFormat=\" cobertura%2cjson\" /p:Include=\" [coverletsample.integration.determisticbuild]*DeepThought\" /p:IncludeTestAssembly=true";
121
122
_output . WriteLine ( $ "Command: dotnet { cmdArgument } ") ;
122
123
int result = DotnetCli ( cmdArgument , out string standardOutput , out string standardError , _testProjectPath ) ;
123
124
if ( ! string . IsNullOrEmpty ( standardError ) )
@@ -161,7 +162,7 @@ public void Msbuild_SourceLink()
161
162
Assert . False ( string . IsNullOrEmpty ( File . ReadAllText ( sourceRootMappingFilePath ) ) ) ;
162
163
Assert . Contains ( "=/_/" , File . ReadAllText ( sourceRootMappingFilePath ) ) ;
163
164
164
- string cmdArgument = $ "test -c { _buildConfiguration } -f { _buildTargetFramework } --no-build /p:CollectCoverage=true /p:CoverletOutput= \" coverage.json \" /p: CoverletOutputFormat=\" cobertura%2cjson\" /p:UseSourceLink=true /p:Include=\" [coverletsample.integration.determisticbuild]*DeepThought\" /p:IncludeTestAssembly=true";
165
+ string cmdArgument = $ "test -c { _buildConfiguration } -f { _buildTargetFramework } --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=\" cobertura%2cjson\" /p:UseSourceLink=true /p:Include=\" [coverletsample.integration.determisticbuild]*DeepThought\" /p:IncludeTestAssembly=true";
165
166
_output . WriteLine ( $ "Command: dotnet { cmdArgument } ") ;
166
167
int result = DotnetCli ( cmdArgument , out string standardOutput , out string standardError , _testProjectPath ) ;
167
168
if ( ! string . IsNullOrEmpty ( standardError ) )
0 commit comments