|
13 | 13 |
|
14 | 14 | <MSTestAnalysisMode>Recommended</MSTestAnalysisMode>
|
15 | 15 |
|
16 |
| - <!-- Arcade runner settings --> |
17 |
| - <TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --diagnostic --diagnostic-output-directory $(RepoRoot)artifacts/log/$(Configuration) --diagnostic-output-fileprefix $(ModuleName) --diagnostic-verbosity trace</TestRunnerAdditionalArguments> |
18 |
| - <TestRunnerAdditionalArguments Condition=" $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETCoreApp' ">$(TestRunnerAdditionalArguments) --crashdump</TestRunnerAdditionalArguments> |
19 |
| - <TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --hangdump --hangdump-timeout 15m</TestRunnerAdditionalArguments> |
20 |
| - <TestRunnerAdditionalArguments Condition=" '$(EnableCodeCoverage)' == 'True' ">$(TestRunnerAdditionalArguments) --coverage --coverage-settings $(RepoRoot)test/coverage.config --coverage-output $(ModuleName).coverage</TestRunnerAdditionalArguments> |
21 |
| - <!-- /Arcade runner settings --> |
| 16 | + <TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --diagnostic --diagnostic-output-directory $(RepoRoot)artifacts/log/$(Configuration) --diagnostic-output-fileprefix $(ModuleName) --diagnostic-verbosity trace</TestingPlatformCommandLineArguments> |
| 17 | + <TestingPlatformCommandLineArguments Condition=" $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETCoreApp' ">$(TestingPlatformCommandLineArguments) --crashdump</TestingPlatformCommandLineArguments> |
| 18 | + <TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --hangdump --hangdump-timeout 15m</TestingPlatformCommandLineArguments> |
| 19 | + <TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --report-azdo</TestingPlatformCommandLineArguments> |
| 20 | + <TestingPlatformCommandLineArguments Condition=" '$(EnableCodeCoverage)' == 'True' ">$(TestingPlatformCommandLineArguments) --coverage --coverage-settings $(RepoRoot)test/coverage.config --coverage-output $(ModuleName).coverage</TestingPlatformCommandLineArguments> |
22 | 21 |
|
23 |
| - <!-- dotnet test runner settings - most duplicate from Arcade to have parity --> |
| 22 | + </PropertyGroup> |
| 23 | + |
| 24 | + <PropertyGroup Condition="'$(UsingDotNetTest)'=='true'"> |
| 25 | + <!-- By default, Arcade already adds report-trx, report-trx-filename, and results-directory --> |
| 26 | + <!-- However, when we run with dotnet test, we need to add these options, but still don't duplicate them on Arcade --> |
| 27 | + <!-- So we detect when running with dotnet test and only add them there. That's unfortunate because any invocation of dotnet test will need to be done with -p:UsingDotNetTest=true --> |
| 28 | + <!-- An alternative is that we always add those options here, and introduce a property in Arcade so that Arcade doesn't add the options again --> |
| 29 | + |
| 30 | + <!-- This usage is bad. See https://github.com/dotnet/arcade/issues/16003 --> |
24 | 31 | <_TestArchitecture>$(PlatformTarget)</_TestArchitecture>
|
25 | 32 | <_TestArchitecture Condition="'$(PlatformTarget)' == '' or '$(PlatformTarget)' == 'AnyCpu'">x64</_TestArchitecture>
|
26 |
| - |
27 |
| - <_ResultFileNameNoExt>$(MSBuildProjectName)_$(TargetFramework)_$(_TestArchitecture)</_ResultFileNameNoExt> |
28 |
| - <ResultsTrxPath>$(ArtifactsTestResultsDir)$(_ResultFileNameNoExt).trx</ResultsTrxPath> |
29 |
| - <_TestResultTrxFileName>$([System.IO.Path]::GetFileName('$(ResultsTrxPath)'))</_TestResultTrxFileName> |
30 |
| - <_TestResultDirectory>$([System.IO.Path]::GetDirectoryName('$(ResultsTrxPath)'))</_TestResultDirectory> |
31 |
| - <TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --report-trx --report-trx-filename "$(_TestResultTrxFileName)" --results-directory "$(_TestResultDirectory)" --report-azdo $(TestRunnerAdditionalArguments)</TestingPlatformCommandLineArguments> |
32 |
| - <!-- /dotnet test runner settings --> |
| 33 | + <TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --report-trx --report-trx-filename $(MSBuildProjectName)_$(TargetFramework)_$(_TestArchitecture).trx --results-directory $(ArtifactsTestResultsDir)</TestingPlatformCommandLineArguments> |
33 | 34 | </PropertyGroup>
|
34 | 35 |
|
35 | 36 | <ItemGroup Condition=" '$(EnableMSTestRunner)' == 'true' OR '$(UseInternalTestFramework)' == 'true' ">
|
|
0 commit comments