Skip to content

Commit 0e6b181

Browse files
authored
Merge branch 'main' into dev/amauryleve/release
2 parents be7b3e6 + 0cac9ba commit 0e6b181

File tree

7 files changed

+176
-112
lines changed

7 files changed

+176
-112
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<!-- Test config -->
6767
<PropertyGroup>
6868
<!-- Needs to be setup globally so that arcade doesn't bring xUnit to playground and other test projects -->
69-
<TestRunnerName>TestingPlatformRunner</TestRunnerName>
69+
<TestRunnerName>Microsoft.Testing.Platform</TestRunnerName>
7070
</PropertyGroup>
7171

7272
<!-- Polyfill config -->

azure-pipelines-official.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ extends:
149149
/bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog
150150
name: Test
151151
displayName: Test
152+
env:
153+
TESTINGPLATFORM_DEFAULT_HANG_TIMEOUT: 5m
152154

153155
- task: CopyFiles@2
154156
displayName: 'Copy binlogs'
@@ -217,6 +219,8 @@ extends:
217219
./test.sh --configuration $(_BuildConfig) --ci --test --integrationTest --nobl /bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog
218220
name: Test
219221
displayName: Tests
222+
env:
223+
TESTINGPLATFORM_DEFAULT_HANG_TIMEOUT: 5m
220224
221225
- task: 1ES.PublishBuildArtifacts@1
222226
displayName: 'Publish Test Results folders'

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ stages:
121121
# Because the build step is using -ci flag, restore is done in a local .packages directory.
122122
# We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them.
123123
# Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set.
124-
- script: dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog --no-progress
124+
- script: dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog --no-progress -p:UsingDotNetTest=true
125125
name: Test
126126
displayName: Test
127127
env:
@@ -199,7 +199,7 @@ stages:
199199
# Because the build step is using -ci flag, restore is done in a local .packages directory.
200200
# We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them.
201201
# Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set.
202-
- script: dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog --no-progress
202+
- script: dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress -p:UsingDotNetTest=true
203203
name: Test
204204
displayName: Test
205205
env:
@@ -263,7 +263,7 @@ stages:
263263
# Because the build step is using -ci flag, restore is done in a local .packages directory.
264264
# We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them.
265265
# Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set.
266-
- script: dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog --no-progress
266+
- script: dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress -p:UsingDotNetTest=true
267267
name: Test
268268
displayName: Test
269269
env:

eng/TestingPlatformRunner/TestingPlatform.Runner.targets

Lines changed: 0 additions & 91 deletions
This file was deleted.

eng/TestingPlatformRunner/TestingPlatformRunner.targets

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/Directory.Build.targets

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,24 @@
1313

1414
<MSTestAnalysisMode>Recommended</MSTestAnalysisMode>
1515

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>
2221

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 -->
2431
<_TestArchitecture>$(PlatformTarget)</_TestArchitecture>
2532
<_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>
3334
</PropertyGroup>
3435

3536
<ItemGroup Condition=" '$(EnableMSTestRunner)' == 'true' OR '$(UseInternalTestFramework)' == 'true' ">

0 commit comments

Comments
 (0)