Skip to content

Commit

Permalink
Merge pull request #121 from microsoft/fhnaseer/cc-17.11.3
Browse files Browse the repository at this point in the history
Upgrading CodeCoverage version to 17.11.3
  • Loading branch information
jakubch1 authored Jun 3, 2024
2 parents 967a10d + b5a5b26 commit cdcbd26
Show file tree
Hide file tree
Showing 46 changed files with 148 additions and 86 deletions.
4 changes: 3 additions & 1 deletion samples/Algorithms/scenarios/scenario01/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Algorithms.Core.Tests
dotnet run --coverage --coverage-output report.cobertura.xml --coverage-output-format cobertura
dotnet run --coverage --coverage-output report.cobertura.xml --coverage-output-format cobertura
Pop-Location
4 changes: 3 additions & 1 deletion samples/Algorithms/scenarios/scenario02/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Algorithms.Core.Tests
dotnet run --coverage --coverage-output report.cobertura.xml --coverage-output-format cobertura --coverage-settings $PSScriptRoot/coverage.config
dotnet run --coverage --coverage-output report.cobertura.xml --coverage-output-format cobertura --coverage-settings $PSScriptRoot/coverage.config
Pop-Location
4 changes: 3 additions & 1 deletion samples/Algorithms/scenarios/scenario03/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Push-Location
cd $PSScriptRoot/../../tests/Algorithms.Core.Tests
dotnet build /p:MsCodeCoverageInstrumentation="true"
dotnet run --no-build --coverage --coverage-output report.cobertura.xml --coverage-output-format cobertura
dotnet run --no-build --coverage --coverage-output report.cobertura.xml --coverage-output-format cobertura
Pop-Location
4 changes: 3 additions & 1 deletion samples/Algorithms/scenarios/scenario04/run.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Push-Location
cd $PSScriptRoot/../../tests/Algorithms.Core.Tests
dotnet build
dotnet tool install -g dotnet-coverage
dotnet-coverage collect --output report.cobertura.xml --output-format cobertura "dotnet run --no-build"
dotnet-coverage collect --output report.cobertura.xml --output-format cobertura "dotnet run --no-build"
Pop-Location
4 changes: 3 additions & 1 deletion samples/Algorithms/scenarios/scenario05/run.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Push-Location
cd $PSScriptRoot/../../src/Algorithms.Console
dotnet publish -r win-x64 -c Release /p:AotMsCodeCoverageInstrumentation="true"
dotnet tool install -g dotnet-coverage
dotnet-coverage collect --output report.cobertura.xml --output-format cobertura bin\Release\net8.0\win-x64\publish\Algorithms.Console.exe
dotnet-coverage collect --output report.cobertura.xml --output-format cobertura bin\Release\net8.0\win-x64\publish\Algorithms.Console.exe
Pop-Location
4 changes: 3 additions & 1 deletion samples/Algorithms/scenarios/scenario06/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Push-Location
cd $PSScriptRoot/../../tests/Algorithms.Core.NativeAot.Tests
dotnet publish -c Release -r win-x64 /p:AotMsCodeCoverageInstrumentation="true"
.\bin\Release\net8.0\win-x64\publish\Algorithms.Core.NativeAot.Tests.exe --coverage --coverage-output-format cobertura --coverage-output report.cobertura.xml
.\bin\Release\net8.0\win-x64\publish\Algorithms.Core.NativeAot.Tests.exe --coverage --coverage-output-format cobertura --coverage-output report.cobertura.xml
Pop-Location
4 changes: 3 additions & 1 deletion samples/Algorithms/scenarios/scenario07/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Algorithms.Core.MSTest.Sdk.Tests
dotnet run --coverage --coverage-output report.cobertura.xml --coverage-output-format cobertura
dotnet run --coverage --coverage-output report.cobertura.xml --coverage-output-format cobertura
Pop-Location
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeCoverage.MSBuild" Version="17.10.4" />
<PackageReference Include="Microsoft.CodeCoverage.MSBuild" Version="17.11.3" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MSTest.Engine" Version="1.0.0-alpha.24163.4" />
<PackageReference Include="MSTest.SourceGeneration" Version="1.0.0-alpha.24163.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Include="MSTest.Analyzers" Version="3.2.2" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.0.2" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.10.4" />
<PackageReference Include="Microsoft.CodeCoverage.MSBuild" Version="17.10.4" />
<PackageReference Include="MSTest.Engine" Version="1.0.0-alpha.24271.6" />
<PackageReference Include="MSTest.SourceGeneration" Version="1.0.0-alpha.24271.6" />
<PackageReference Include="MSTest.TestFramework" Version="3.4.2" />
<PackageReference Include="MSTest.Analyzers" Version="3.4.2" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.2.1" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.11.3" />
<PackageReference Include="Microsoft.CodeCoverage.MSBuild" Version="17.11.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MSTest" Version="3.2.2" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.0.2" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.10.4" />
<PackageReference Include="Microsoft.CodeCoverage.MSBuild" Version="17.10.4" />
<PackageReference Include="MSTest" Version="3.4.2" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.2.1" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.11.3" />
<PackageReference Include="Microsoft.CodeCoverage.MSBuild" Version="17.11.3" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario01/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Calculator.Core.Tests
dotnet test --collect "Code Coverage"
dotnet test --collect "Code Coverage"
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario02/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Calculator.Core.Tests
dotnet test --collect "Code Coverage;Format=cobertura"
dotnet test --collect "Code Coverage;Format=cobertura"
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario03/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Calculator.Core.Tests
dotnet test --settings ../../scenarios/scenario03/coverage.runsettings
dotnet test --settings ../../scenarios/scenario03/coverage.runsettings
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario04/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Calculator.Core.Tests
dotnet test --collect "Code Coverage;Format=xml"
dotnet test --collect "Code Coverage;Format=xml"
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario05/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Calculator.Core.Tests
dotnet test --settings ../../scenarios/scenario05/coverage.runsettings
dotnet test --settings ../../scenarios/scenario05/coverage.runsettings
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario06/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Calculator.Core.Tests
dotnet test --settings ../../scenarios/scenario06/coverage.runsettings
dotnet test --settings ../../scenarios/scenario06/coverage.runsettings
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario07/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Calculator.Core.Tests
dotnet test --settings ../../scenarios/scenario07/coverage.runsettings
dotnet test --settings ../../scenarios/scenario07/coverage.runsettings
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario08/run.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Push-Location
cd $PSScriptRoot/../../src/Calculator.Console
dotnet build
dotnet tool install -g dotnet-coverage
dotnet-coverage collect -f cobertura "dotnet run --no-build add 10 24"
dotnet-coverage collect -f cobertura "dotnet run --no-build add 10 24"
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario09/run.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Push-Location
cd $PSScriptRoot/../../src/Calculator.Console
dotnet build
dotnet tool install -g dotnet-coverage
dotnet-coverage collect -f cobertura -s ../../scenarios/scenario09/coverage.runsettings --include-files "./bin/Debug/**/*.dll" "dotnet run --no-build add 10 24"
dotnet-coverage collect -f cobertura -s ../../scenarios/scenario09/coverage.runsettings --include-files "./bin/Debug/**/*.dll" "dotnet run --no-build add 10 24"
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario10/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Push-Location
cd $PSScriptRoot/../../src/Calculator.Console
dotnet build
dotnet tool install -g dotnet-coverage
Expand All @@ -6,4 +7,5 @@ dotnet-coverage instrument --session-id TagScenario10 "./bin/Debug/net8.0/Calcul
dotnet-coverage collect --session-id TagScenario10 --server-mode --background -f cobertura
dotnet run --no-build add 10 24
dotnet run --no-build multiply 10 24
dotnet-coverage shutdown TagScenario10
dotnet-coverage shutdown TagScenario10
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario11/run.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Push-Location
cd $PSScriptRoot/../../src/Calculator.Console
dotnet build
cd $PSScriptRoot/../../tests/Calculator.Console.Tests
dotnet test --settings ../../scenarios/scenario11/coverage.runsettings
dotnet test --settings ../../scenarios/scenario11/coverage.runsettings
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario12/run.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Push-Location
cd $PSScriptRoot/../../src/Calculator.Console
dotnet build
cd $PSScriptRoot/../../tests/Calculator.Console.Tests
dotnet test --settings ../../scenarios/scenario12/coverage.runsettings
dotnet test --settings ../../scenarios/scenario12/coverage.runsettings
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario13/run.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Push-Location
cd $PSScriptRoot/../../tests/Calculator.Server.Tests
dotnet test --collect "Code Coverage"
dotnet test --collect "Code Coverage"
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario14/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Push-Location
cd $PSScriptRoot/../..
dotnet build
dotnet tool install -g dotnet-coverage
Expand All @@ -6,4 +7,5 @@ dotnet-coverage collect --output report.coverage --session-id TagScenario14 "dot
cd $PSScriptRoot/../../tests/Calculator.Server.IntegrationTests
dotnet test --collect "Code Coverage"
dotnet-coverage shutdown TagScenario14
dotnet-coverage merge --output merged.coverage **/*.coverage $PSScriptRoot/../../src/Calculator.Server/report.coverage
dotnet-coverage merge --output merged.coverage **/*.coverage $PSScriptRoot/../../src/Calculator.Server/report.coverage
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario15/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Push-Location
cd $PSScriptRoot/../..
dotnet build
dotnet tool install -g dotnet-coverage
Expand All @@ -7,4 +8,5 @@ dotnet-coverage connect --background TagScenario15 "dotnet run --no-build"
cd $PSScriptRoot/../../tests/Calculator.Server.IntegrationTests
dotnet-coverage connect TagScenario15 "dotnet test --no-build"
dotnet-coverage shutdown TagScenario15
cd $PSScriptRoot/../..
cd $PSScriptRoot/../..
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario16/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Push-Location
cd $PSScriptRoot/../..
dotnet build
dotnet tool install -g dotnet-coverage
Expand All @@ -14,4 +15,5 @@ dotnet-coverage connect TagScenario16 "dotnet test --no-build --filter divide"
dotnet-coverage snapshot --reset --output ../../snapshot4.cobertura.xml TagScenario16
dotnet-coverage shutdown TagScenario16
cd $PSScriptRoot/../..
dotnet-coverage merge --output-format cobertura --output report.cobertura.xml *.cobertura.xml
dotnet-coverage merge --output-format cobertura --output report.cobertura.xml *.cobertura.xml
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario17/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Push-Location
cd $PSScriptRoot/../..
dotnet build
dotnet tool install -g dotnet-coverage
Expand All @@ -13,4 +14,5 @@ dotnet-coverage snapshot --output ../../snapshot3.cobertura.xml TagScenario17
dotnet-coverage connect TagScenario17 "dotnet test --no-build --filter divide"
dotnet-coverage snapshot --output ../../snapshot4.cobertura.xml TagScenario17
dotnet-coverage shutdown TagScenario17
cd $PSScriptRoot/../..
cd $PSScriptRoot/../..
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario18/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Push-Location
cd $PSScriptRoot/../..
dotnet build
dotnet tool install -g dotnet-coverage
Expand All @@ -6,4 +7,5 @@ dotnet-coverage collect --output report.coverage --session-id TagScenario18 "dot
cd $PSScriptRoot/../..
dotnet test --collect "Code Coverage" --results-directory "$PSScriptRoot/../../TestResults/"
dotnet-coverage shutdown TagScenario18
dotnet-coverage merge --output-format cobertura --output merged.cobertura.xml $PSScriptRoot/../../TestResults/**/*.coverage $PSScriptRoot/../../src/Calculator.Server/report.coverage
dotnet-coverage merge --output-format cobertura --output merged.cobertura.xml $PSScriptRoot/../../TestResults/**/*.coverage $PSScriptRoot/../../src/Calculator.Server/report.coverage
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario19/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Push-Location
cd $PSScriptRoot/../..
dotnet build
dotnet tool install -g dotnet-coverage
Expand All @@ -6,4 +7,5 @@ dotnet-coverage collect --output report.coverage --session-id TagScenario19 "dot
cd $PSScriptRoot/../..
dotnet test --settings ./scenarios/scenario19/coverage.runsettings --results-directory "$PSScriptRoot/../../TestResults/"
dotnet-coverage shutdown TagScenario19
dotnet-coverage merge --output-format cobertura --output merged.cobertura.xml $PSScriptRoot/../../TestResults/**/*.coverage $PSScriptRoot/../../src/Calculator.Server/report.coverage
dotnet-coverage merge --output-format cobertura --output merged.cobertura.xml $PSScriptRoot/../../TestResults/**/*.coverage $PSScriptRoot/../../src/Calculator.Server/report.coverage
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario20/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Push-Location
cd $PSScriptRoot/../..
dotnet build
dotnet tool install -g dotnet-coverage
Expand All @@ -7,4 +8,5 @@ dotnet-coverage collect -l $PSScriptRoot/../../logs/collect.log -ll Verbose --se
cd $PSScriptRoot/../..
dotnet test --settings ./scenarios/scenario20/coverage.runsettings --results-directory "$PSScriptRoot/../../TestResults/" --diag $PSScriptRoot/../../logs/log.txt
dotnet-coverage shutdown -l $PSScriptRoot/../../logs/shutdown.log -ll Verbose TagScenario20
dotnet-coverage merge -l $PSScriptRoot/../../logs/merge.log -ll Verbose --output-format cobertura --output merged.cobertura.xml $PSScriptRoot/../../TestResults/**/*.coverage $PSScriptRoot/../../src/Calculator.Server/report.coverage
dotnet-coverage merge -l $PSScriptRoot/../../logs/merge.log -ll Verbose --output-format cobertura --output merged.cobertura.xml $PSScriptRoot/../../TestResults/**/*.coverage $PSScriptRoot/../../src/Calculator.Server/report.coverage
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario22/run.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Push-Location
cd $PSScriptRoot/../../src/Calculator.Console
dotnet build
$env:STATIC_INSTRUMENTATION_DIR="$PSScriptRoot/../../src/Calculator.Console"
cd $PSScriptRoot/../../tests/Calculator.Console.Tests
dotnet test --settings ../../scenarios/scenario22/coverage.runsettings
dotnet test --settings ../../scenarios/scenario22/coverage.runsettings
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario23/run.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Push-Location
cd $PSScriptRoot/../../src/Calculator.Console
dotnet build
$env:STATIC_INSTRUMENTATION_DIR="$PSScriptRoot/../../src/Calculator.Console"
cd $PSScriptRoot/../../tests/Calculator.Console.Tests
dotnet test --settings ../../scenarios/scenario23/coverage.runsettings
dotnet test --settings ../../scenarios/scenario23/coverage.runsettings
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario24/run.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Push-Location
cd $PSScriptRoot/../..
dotnet build
dotnet test --no-build --collect "Code Coverage"
dotnet test --no-build --collect "Code Coverage"
Pop-Location
4 changes: 3 additions & 1 deletion samples/Calculator/scenarios/scenario25/run.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Push-Location
cd $PSScriptRoot/../..
dotnet build
dotnet tool install -g dotnet-coverage
dotnet-coverage collect -f cobertura -o report.cobertura.xml "dotnet test --no-build"
dotnet-coverage collect -f cobertura -o report.cobertura.xml "dotnet test --no-build"
Pop-Location
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Loading

0 comments on commit cdcbd26

Please sign in to comment.