Skip to content

Commit 07c6a62

Browse files
authored
Execute interop and template tests on latest Fx (#32510)
- restore `$(TestDependsOnAspNetRuntime)` settings - needed to execute on just-built Microsoft.AspNetCore.App.Runtime - separate from `$(TestDependsOnAspNetPackages)` because App.UnitTests need only the packages - import Helix.props when Helix.targets is imported - ensure necessary `$(IsTestProject)` overrides occur prior to explicit root Directory.Build.props imports nit: use `bool` form in `Conditions` using above properties
1 parent a38fc6a commit 07c6a62

File tree

7 files changed

+19
-7
lines changed

7 files changed

+19
-7
lines changed

eng/targets/Helix.props

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<LoggingTestingDisableFileLogging Condition="'$(IsHelixJob)' == 'true'">false</LoggingTestingDisableFileLogging>
2424
<NodeVersion>10.15.3</NodeVersion>
2525
<TestDependsOnAspNetPackages>false</TestDependsOnAspNetPackages>
26+
<TestDependsOnAspNetRuntime>false</TestDependsOnAspNetRuntime>
2627
</PropertyGroup>
2728

2829
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">

eng/targets/Helix.targets

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ItemGroup Condition="'$(TestDependsOnPlaywright)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true'">
1717
<HelixPreCommand Include="call RunPowershell.cmd installPlaywrightReqs.ps1 || exit /b 1" />
1818
</ItemGroup>
19-
19+
2020
<ItemGroup Condition="'$(TestDependsOnIIS)' == 'true' AND '$(IsWindowsOnlyTest)' == 'true'">
2121
<HelixContent Include="$(RepoRoot)src\Servers\IIS\tools\update_schema.ps1" />
2222
<HelixContent Include="$(RepoRoot)src\Servers\IIS\tools\UpdateIISExpressCertificate.ps1" />
@@ -35,10 +35,15 @@
3535
<HelixPreCommand Include="call RunPowershell.cmd InstallNode.ps1 $(NodeVersion) || exit /b 1" />
3636
</ItemGroup>
3737

38-
<ItemGroup Condition=" '$(TestDependsOnAspNetPackages)' == 'true' ">
38+
<!-- $(TestDependsOnAspNetRuntime) implies $(TestDependsOnAspNetPackages). Separate for the App.UnitTests case. -->
39+
<PropertyGroup Condition=" $(TestDependsOnAspNetRuntime) AND !$(TestDependsOnAspNetPackages) ">
40+
<TestDependsOnAspNetPackages>true</TestDependsOnAspNetPackages>
41+
</PropertyGroup>
42+
<ItemGroup Condition=" $(TestDependsOnAspNetPackages) ">
3943
<!-- Grab all shipping packages. -->
4044
<HelixContent Include="$(RepoRoot)artifacts\packages\$(Configuration)\Shipping\*$(SharedFxVersion).nupkg" />
4145
</ItemGroup>
46+
4247
<ItemGroup>
4348
<!-- Java test projects do not use xUnit. -->
4449
<HelixContent Include="$(OutputPath)Microsoft.VisualStudio.TestPlatform.Extension.Xunit.Xml.TestAdapter.dll"

src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<Project DefaultTargets="Build">
2+
<PropertyGroup>
3+
<IsTestProject>true</IsTestProject>
4+
</PropertyGroup>
5+
26
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
37

48
<PropertyGroup>
5-
<IsTestProject>true</IsTestProject>
69
<IsPackable>false</IsPackable>
710
</PropertyGroup>
811

src/Grpc/test/InteropTests/InteropTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<ContainsFunctionalTestAssets>true</ContainsFunctionalTestAssets>
55
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
6-
<TestDependsOnAspNetPackages>true</TestDependsOnAspNetPackages>
6+
<TestDependsOnAspNetRuntime>true</TestDependsOnAspNetRuntime>
77
</PropertyGroup>
88

99
<ItemGroup>

src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<!-- TestTemplateCreationFolder is the folder where the templates will be created. Will point out to $(OutputDir)$(TestTemplateCreationFolder) -->
1414
<TestTemplateCreationFolder>TestTemplates\</TestTemplateCreationFolder>
1515
<TestPackageRestorePath>$([MSBuild]::EnsureTrailingSlash('$(RepoRoot)'))obj\template-restore\</TestPackageRestorePath>
16-
<TestDependsOnAspNetPackages>true</TestDependsOnAspNetPackages>
16+
<TestDependsOnAspNetRuntime>true</TestDependsOnAspNetRuntime>
1717
<TestDependsOnMssql>true</TestDependsOnMssql>
1818
<TestDependsOnPlaywright>true</TestDependsOnPlaywright>
1919
</PropertyGroup>

src/ProjectTemplates/test/ProjectTemplates.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<!-- TestTemplateCreationFolder is the folder where the templates will be created. Will point out to $(OutputDir)$(TestTemplateCreationFolder) -->
1919
<TestTemplateCreationFolder>TestTemplates\</TestTemplateCreationFolder>
2020
<TestPackageRestorePath>$([MSBuild]::EnsureTrailingSlash('$(RepoRoot)'))obj\template-restore\</TestPackageRestorePath>
21-
<TestDependsOnAspNetPackages>true</TestDependsOnAspNetPackages>
21+
<TestDependsOnAspNetRuntime>true</TestDependsOnAspNetRuntime>
2222
</PropertyGroup>
2323

2424
<ItemGroup>

src/SignalR/clients/ts/client-ts.npmproj

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<Project>
2+
<PropertyGroup>
3+
<IsTestProject>true</IsTestProject>
4+
</PropertyGroup>
5+
26
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
37

48
<PropertyGroup>
59
<IsPackable>false</IsPackable>
610
<IsBuildable>false</IsBuildable>
7-
<IsTestProject>true</IsTestProject>
811
<!-- Npm tests don't run on Helix currently, so we need to set this to false to still run the tests on non-Helix -->
912
<BuildHelixPayload>false</BuildHelixPayload>
1013
</PropertyGroup>

0 commit comments

Comments
 (0)