@@ -85,8 +85,9 @@ private protected void AssertCoverage(string standardOutput = "", string reportN
8585
8686 if ( checkDeterministicReport )
8787 {
88+ string newName = reportName . Replace ( "json" , "cobertura.xml" ) ;
8889 // 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 ) )
9091 {
9192 Assert . Contains ( "/_/test/coverlet.integration.determisticbuild/DeepThought.cs" , File . ReadAllText ( coverageFile ) ) ;
9293 File . Delete ( coverageFile ) ;
@@ -117,7 +118,7 @@ public void Msbuild()
117118 Assert . False ( string . IsNullOrEmpty ( File . ReadAllText ( sourceRootMappingFilePath ) ) ) ;
118119 Assert . Contains ( "=/_/" , File . ReadAllText ( sourceRootMappingFilePath ) ) ;
119120
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";
121122 _output . WriteLine ( $ "Command: dotnet { cmdArgument } ") ;
122123 int result = DotnetCli ( cmdArgument , out string standardOutput , out string standardError , _testProjectPath ) ;
123124 if ( ! string . IsNullOrEmpty ( standardError ) )
@@ -161,7 +162,7 @@ public void Msbuild_SourceLink()
161162 Assert . False ( string . IsNullOrEmpty ( File . ReadAllText ( sourceRootMappingFilePath ) ) ) ;
162163 Assert . Contains ( "=/_/" , File . ReadAllText ( sourceRootMappingFilePath ) ) ;
163164
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";
165166 _output . WriteLine ( $ "Command: dotnet { cmdArgument } ") ;
166167 int result = DotnetCli ( cmdArgument , out string standardOutput , out string standardError , _testProjectPath ) ;
167168 if ( ! string . IsNullOrEmpty ( standardError ) )
0 commit comments