Reenable IISExpress on helix (#7586)

This commit is contained in:
Pavel Krymets 2019-02-25 09:05:19 -08:00 committed by GitHub
parent def36fab1e
commit 78bc2a10b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 292 additions and 207 deletions

View File

@ -98,90 +98,4 @@
<Import Project="eng\targets\Npm.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
<Import Project="eng\targets\ReferenceAssembly.targets" Condition=" '$(HasReferenceAssembly)' == 'true' " />
<!-- Prepares the test projects for helix by including xunit and publishing -->
<Target Name="PrepareHelixPayload" Returns="@(HelixDirectory)">
<ItemGroup>
<_TargetFrameworks Remove="@(_TargetFrameworks)" />
<_TargetFrameworks Include="$(TargetFrameworks);$(TargetFramework)" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="_PrepareHelixPayloadInner"
Properties="TargetFramework=%(_TargetFrameworks.Identity);IsWindowsHelixQueue=$(HelixTargetQueue.Contains('Windows'))">
<Output TaskParameter="TargetOutputs" ItemName="HelixDirectory" />
</MSBuild>
</Target>
<Target Name="_PrepareHelixPayloadInner"
DependsOnTargets="Publish"
Condition="'$(BuildHelixPayload)' == 'true'"
Returns="@(HelixDirectory)">
<ItemGroup>
<HelixDirectory Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
</Target>
<!-- Build the actual helix work items to send to helix queues -->
<Target Name="CreateHelixPayload" Returns="@(HelixPayload)">
<ItemGroup>
<_TargetFrameworks Remove="@(_TargetFrameworks)" />
<_TargetFrameworks Include="$(TargetFrameworks);$(TargetFramework)" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="_CreateHelixPayloadInner"
Properties="TargetFramework=%(_TargetFrameworks.Identity);IsWindowsHelixQueue=$(HelixTargetQueue.Contains('Windows'))">
<Output TaskParameter="TargetOutputs" ItemName="HelixPayload" />
</MSBuild>
</Target>
<Target Name="CollectXunitConsoleRunner" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PropertyGroup>
<XunitConsoleRunnerDir>$([System.IO.Path]::GetDirectoryName($(XunitConsole472Path)))</XunitConsoleRunnerDir>
</PropertyGroup>
<ItemGroup>
<XunitConsoleRunnerFiles Include="$(XunitConsoleRunnerDir)/**/*" />
</ItemGroup>
<Copy SourceFiles="@(XunitConsoleRunnerFiles)" DestinationFolder="$(PublishDir)" />
</Target>
<Target Name="_CreateHelixPayloadInner"
DependsOnTargets="CollectXunitConsoleRunner"
Condition="($(IsWindowsHelixQueue) OR '$(TargetFrameworkIdentifier)' != '.NETFramework')"
Returns="@(HelixPayload)">
<ConvertToAbsolutePath Paths="$(PublishDir)">
<Output TaskParameter="AbsolutePaths" PropertyName="PublishAbsoluteDir" />
</ConvertToAbsolutePath>
<!-- Windows NetCore -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework' AND $(IsWindowsHelixQueue)" >
<_CopyItems Include="$(MSBuildThisFileDirectory)eng\helix\vstest\runtests.cmd" />
</ItemGroup>
<!-- Windows NetFramework -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' AND $(IsWindowsHelixQueue)" >
<_CopyItems Include="$(MSBuildThisFileDirectory)eng\helix\xunit\runtests.cmd" />
</ItemGroup>
<!-- NonWindows -->
<ItemGroup Condition="!$(IsWindowsHelixQueue)" >
<_CopyItems Include="$(MSBuildThisFileDirectory)eng\helix\vstest\runtests.sh" />
</ItemGroup>
<Copy SourceFiles="@(_CopyItems)" DestinationFolder="$(PublishAbsoluteDir)" />
<ItemGroup>
<HelixPayload Include="$(PublishAbsoluteDir)">
<TestAssembly>$(TargetFileName)</TestAssembly>
<TestName>$(MSBuildProjectName)-$(TargetFramework)</TestName>
<Command Condition="$(IsWindowsHelixQueue)">runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppPackageVersion)</Command>
<Command Condition="!$(IsWindowsHelixQueue)">./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppPackageVersion)</Command>
<TestTimeout>00:30:00</TestTimeout>
</HelixPayload>
</ItemGroup>
</Target>
</Project>

View File

@ -151,30 +151,9 @@
Properties="$(BuildProperties);__DummyTarget=GenerateBuildAssetManifest" />
</Target>
<!-- will move into korebuild -->
<Target Name="HelixPublish" DependsOnTargets="Restore">
<ItemGroup>
<CsProjects Include="@(ProjectToBuild)" Condition="'%(Extension)' == '.csproj'" />
</ItemGroup>
<MSBuild Projects="@(CsProjects)"
Targets="PrepareHelixPayload"
BuildInParallel="false">
<Output TaskParameter="TargetOutputs" ItemName="HelixDirectory" />
</MSBuild>
<ItemGroup>
<HelixTestProject Include="@(HelixDirectory)" />
</ItemGroup>
</Target>
<Target Name="Helix" DependsOnTargets="HelixPublish">
<PropertyGroup>
<HelixTestProjects>@(HelixTestProject)</HelixTestProjects>
</PropertyGroup>
<Target Name="Helix" DependsOnTargets="Restore">
<MSBuild Projects="$(MSBuildThisFileDirectory)..\eng\helix\helix.proj"
Targets="Test"
Properties="ProjectsToTest=$(HelixTestProjects)"
ContinueOnError="ErrorAndStop"
BuildInParallel="false" />
ContinueOnError="ErrorAndStop" />
</Target>
</Project>

View File

@ -1,25 +1,14 @@
<Project DefaultTargets="Test">
<!-- Version included until we get global.json generation to support this SDK. -->
<Sdk Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19073.6" />
<Sdk Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19105.2" />
<Target Name="Gather" BeforeTargets="Test">
<ItemGroup>
<ProjectsToTest Include="$(ProjectsToTest)" />
</ItemGroup>
<MSBuild Projects="@(ProjectsToTest)"
Targets="CreateHelixPayload"
BuildInParallel="true">
<Output TaskParameter="TargetOutputs" ItemName="HelixPayload" />
</MSBuild>
<ItemGroup>
<HelixWorkItem Include="%(HelixPayload.TestName)">
<Command>%(HelixPayload.Command)</Command>
<PayloadDirectory>%(HelixPayload.Identity)</PayloadDirectory>
<Timeout>%(HelixPayload.TestTimeout)</Timeout>
</HelixWorkItem>
</ItemGroup>
</Target>
<Import Project="$(RepositoryRoot)\eng\targets\Helix.Common.props" />
<Import Project="$(RepositoryRoot)\build\repo.props" />
<ItemGroup>
<HelixTargetQueue Include="@(HelixAvailibleTargetQueue)" />
</ItemGroup>
<PropertyGroup>
<HelixSource>pr/aspnet/aspnetcore</HelixSource>
@ -32,20 +21,15 @@
<EnableAzurePipelinesReporter>false</EnableAzurePipelinesReporter>
<IsExternal>true</IsExternal>
<Creator>aspnetcore</Creator>
<HelixTargetQueues>
Windows.10.Amd64.ClientRS4.VS2017.Open;
OSX.1012.Amd64.Open;
Ubuntu.1810.Amd64.Open;
Ubuntu.1604.Amd64.Open;
Centos.7.Amd64.Open;
Debian.8.Amd64.Open;
Debian.9.Amd64.Open;
Redhat.7.Amd64.Open;
Fedora.27.Amd64.Open;
Fedora.28.Amd64.Open;
</HelixTargetQueues>
<!-- TODO: re-enable Debian.9.Arm64.Open and Ubuntu.1804.Arm64.Open -->
<!-- TODO: re-enable Ubuntu.1604.Arm64.Open; curl not found -->
</PropertyGroup>
</Project>
<Target Name="Gather" BeforeTargets="Build">
<MSBuild Projects="@(ProjectToBuild)"
Targets="CreateHelixPayload"
BuildInParallel="true"
SkipNonexistentTargets="true">
<Output TaskParameter="TargetOutputs" ItemName="HelixWorkItem" />
</MSBuild>
</Target>
</Project>

View File

@ -1,14 +1,14 @@
set target=%1
set sdkVersion=%2
set runtimeVersion=%3
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Version %sdkVersion% -InstallDir %HELIX_CORRELATION_PAYLOAD%\sdk"
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Runtime dotnet -Version %runtimeVersion% -InstallDir %HELIX_CORRELATION_PAYLOAD%\sdk"
set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\sdk
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture x64 -Version %sdkVersion% -InstallDir %DOTNET_ROOT%"
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture x64 -Runtime dotnet -Version %runtimeVersion% -InstallDir %DOTNET_ROOT%"
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
set DOTNET_ROOT="$HELIX_CORRELATION_PAYLOAD/sdk"
set PATH="$DOTNET_ROOT:$PATH"
set PATH=%DOTNET_ROOT%;%PATH%
set DOTNET_MULTILEVEL_LOOKUP=0
set DOTNET_CLI_HOME="$HELIX_CORRELATION_PAYLOAD/home"
set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home
set helix=true
%HELIX_CORRELATION_PAYLOAD%\sdk\dotnet vstest %target% --logger:trx
%DOTNET_ROOT%\dotnet vstest %target% --logger:trx

View File

@ -0,0 +1,6 @@
@ECHO OFF
SET _TAIL=%*
CALL SET _TAIL=%%_TAIL:*%1=%%
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; try { & '%~dp0%1' %_TAIL%; exit $LASTEXITCODE } catch { write-host $_; exit 1 }"

View File

@ -53,5 +53,6 @@
</ItemGroup>
<Import Project="CSharp.ReferenceAssembly.props" Condition="'$(IsReferenceAssemblyProject)' == 'true'" />
<Import Project="Helix.props" Condition="'$(IsTestProject)' == 'true'" />
</Project>

View File

@ -36,4 +36,5 @@
<Import Project="Packaging.targets" />
<Import Project="ResolveReferences.targets" />
<Import Project="Helix.targets" Condition="'$(IsTestProject)' == 'true'" />
</Project>

View File

@ -0,0 +1,21 @@
<Project>
<!-- this file is shared between Helix.proj and .csproj files -->
<ItemGroup>
<HelixAvailblePlatform Include="Windows" />
<HelixAvailblePlatform Include="OSX" />
<HelixAvailblePlatform Include="Linux" />
<HelixAvailibleTargetQueue Include="Windows.10.Amd64.ClientRS4.VS2017.Open" Platform="Windows" />
<HelixAvailibleTargetQueue Include="OSX.1012.Amd64.Open" Platform="OSX" />
<HelixAvailibleTargetQueue Include="Ubuntu.1810.Amd64.Open" Platform="Linux" />
<HelixAvailibleTargetQueue Include="Ubuntu.1604.Amd64.Open" Platform="Linux" />
<HelixAvailibleTargetQueue Include="Centos.7.Amd64.Open" Platform="Linux" />
<HelixAvailibleTargetQueue Include="Debian.8.Amd64.Open" Platform="Linux" />
<HelixAvailibleTargetQueue Include="Debian.9.Amd64.Open" Platform="Linux" />
<HelixAvailibleTargetQueue Include="Redhat.7.Amd64.Open" Platform="Linux" />
<HelixAvailibleTargetQueue Include="Fedora.27.Amd64.Open" Platform="Linux" />
<HelixAvailibleTargetQueue Include="Fedora.28.Amd64.Open" Platform="Linux" />
<!-- TODO: re-enable Debian.9.Arm64.Open and Ubuntu.1804.Arm64.Open -->
</ItemGroup>
</Project>

38
eng/targets/Helix.props Normal file
View File

@ -0,0 +1,38 @@
<Project>
<Import Project="Helix.Common.props" />
<ItemDefinitionGroup>
<HelixContent>
<CopyToBuildDirectory>Never</CopyToBuildDirectory>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
</HelixContent>
</ItemDefinitionGroup>
<PropertyGroup>
<CreateHelixPayload>true</CreateHelixPayload>
<HelixTimeout>00:30:00</HelixTimeout>
<IsWindowsHelixQueue>$(HelixTargetQueue.Contains('Windows'))</IsWindowsHelixQueue>
<HelixTestName>$(MSBuildProjectName)-$(TargetFramework)</HelixTestName>
<HelixUseArchive>false</HelixUseArchive>
<LoggingTestingDisableFileLogging Condition="'$(IsHelixJob)' == 'true'">true</LoggingTestingDisableFileLogging>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<HelixProjectPlatform Include="Windows" />
<HelixContent Include="$(RepositoryRoot)eng\helix\xunit\runtests.cmd" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<HelixProjectPlatform Include="@(HelixAvailblePlatform)" />
<HelixContent Include="$(RepositoryRoot)eng\helix\vstest\runtests.sh" />
<HelixContent Include="$(RepositoryRoot)eng\helix\vstest\runtests.cmd" />
</ItemGroup>
<ItemGroup>
<HelixContent Include="$(RepositoryRoot)eng\scripts\RunPowershell.cmd" />
</ItemGroup>
</Project>

72
eng/targets/Helix.targets Normal file
View File

@ -0,0 +1,72 @@
<Project>
<!-- Item group has to be defined here becasue Helix.props is evaluated before xunit.runner.console.props -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<HelixContent Condition="'$(XunitConsole472Path)' != ''" Include="$([System.IO.Path]::GetDirectoryName('$(XunitConsole472Path)'))/**/*" />
</ItemGroup>
<ItemGroup>
<Content Include="@(HelixContent)" />
</ItemGroup>
<!-- Build the actual helix work items to send to helix queues -->
<Target Name="CreateHelixPayload" Returns="@(HelixWorkItem)">
<ItemGroup>
<_TargetFrameworks Remove="@(_TargetFrameworks)" />
<_TargetFrameworks Include="$(TargetFrameworks);$(TargetFramework)" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="_CreateHelixPayloadInner"
Properties="TargetFramework=%(_TargetFrameworks.Identity);">
<Output TaskParameter="TargetOutputs" ItemName="HelixWorkItem" />
</MSBuild>
</Target>
<Target Name="_SetCreateHelixPayload">
<PropertyGroup>
<_SelectedPlatforms>@(HelixProjectPlatform)</_SelectedPlatforms>
</PropertyGroup>
<ItemGroup>
<_HelixProjectTargetQueue Include="%(HelixAvailibleTargetQueue.Identity)" Condition="'$(_SelectedPlatforms.Contains(%(Platform)))' == 'true' AND '%(Identity)' == '$(HelixTargetQueue)'" />
</ItemGroup>
<PropertyGroup>
<BuildHelixPayload Condition="'@(_HelixProjectTargetQueue->Count())' == '0'">false</BuildHelixPayload>
</PropertyGroup>
</Target>
<Target Name="_PublishHelixArchive" DependsOnTargets="Publish" >
<ZipDirectory Condition="'$(HelixUseArchive)' == 'true'" SourceDirectory="$(PublishDir)" DestinationFile="$(PublishDir)../$(HelixTestName).zip" Overwrite="true" />
<RemoveDir Condition="'$(HelixUseArchive)' == 'true'" Directories="$(PublishDir)" />
</Target>
<Target Name="_CreateHelixWorkItem" Condition="$(BuildHelixPayload)">
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_PublishHelixArchive" RemoveProperties="HelixTargetQueue" />
<ConvertToAbsolutePath Paths="$(PublishDir)">
<Output TaskParameter="AbsolutePaths" PropertyName="PublishAbsoluteDir" />
</ConvertToAbsolutePath>
<ItemGroup>
<HelixWorkItem Include="$(HelixTestName)">
<PayloadArchive Condition="'$(HelixUseArchive)' == 'true'">$(PublishAbsoluteDir)../$(HelixTestName).zip</PayloadArchive>
<PayloadDirectory Condition="'$(HelixUseArchive)' == 'false'">$(PublishAbsoluteDir)</PayloadDirectory>
<TestAssembly>$(TargetFileName)</TestAssembly>
<PreCommands>@(HelixPreCommand)</PreCommands>
<PostCommands>@(HelixPostCommand)</PostCommands>
<Command Condition="$(IsWindowsHelixQueue)">call runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppPackageVersion)</Command>
<Command Condition="!$(IsWindowsHelixQueue)">./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppPackageVersion)</Command>
<Timeout>$(HelixTimeout)</Timeout>
</HelixWorkItem>
</ItemGroup>
</Target>
<Target Name="_CreateHelixPayloadInner" Returns="@(HelixWorkItem)" DependsOnTargets="_SetCreateHelixPayload;_CreateHelixWorkItem">
</Target>
</Project>

View File

@ -50,7 +50,7 @@
BeforeTargets="AssignTargetPaths"
Condition="$(PackNativeAssets) == 'true'">
<ItemGroup>
<None Include="%(InProcessComponents.DllLocation)" CopyToOutputDirectory="PreserveNewest" Link="%(InProcessComponents.Platform)\%(InProcessComponents.NativeAsset).dll" />
<None Include="%(InProcessComponents.DllLocation)" CopyToPublishDirectory="PreserveNewest" CopyToOutputDirectory="PreserveNewest" Link="%(InProcessComponents.Platform)\%(InProcessComponents.NativeAsset).dll" />
</ItemGroup>
</Target>
</Project>

View File

@ -31,6 +31,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
private readonly string _dotnetLocation = DotNetCommands.GetDotNetExecutable(RuntimeArchitecture.x64);
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
[ConditionalFact]
[RequiresIIS(IISCapability.PoolEnvironmentVariables)]
public async Task ExpandEnvironmentVariableInWebConfig()
@ -67,6 +68,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
Assert.Contains("HTTP Error 500.0 - ANCM In-Process Handler Load Failure", await response.Content.ReadAsStringAsync());
}
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
[ConditionalFact]
public async Task StartsWithDotnetLocationWithoutExe()
{
@ -78,6 +80,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
await StartAsync(deploymentParameters);
}
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
[ConditionalFact]
public async Task StartsWithDotnetLocationUppercase()
{
@ -89,6 +92,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
await StartAsync(deploymentParameters);
}
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
[ConditionalTheory]
[InlineData("dotnet")]
[InlineData("dotnet.EXE")]
@ -108,6 +112,8 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains("Invoking where.exe to find dotnet.exe")));
}
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
[ConditionalTheory]
[InlineData(RuntimeArchitecture.x64)]
[InlineData(RuntimeArchitecture.x86)]
@ -184,6 +190,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
await StartAsync(deploymentParameters);
}
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
[ConditionalFact]
[RequiresIIS(IISCapability.PoolEnvironmentVariables)]
public async Task StartsWithPortableAndBootstraperExe()

View File

@ -2,6 +2,8 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<IsTestProject>false</IsTestProject>
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
</PropertyGroup>
<ItemGroup>

View File

@ -0,0 +1,42 @@
<Project>
<PropertyGroup>
<HelixTimeout>00:45:00</HelixTimeout>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Content Include="..\Common.FunctionalTests\AppHostConfig\*.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<HelixProjectPlatform Remove="Linux;OSX" />
<HelixContent Include="..\..\..\tools\update_schema.ps1" />
<HelixContent Include="..\..\..\tools\UpdateIISExpressCertificate.ps1" />
<HelixContent Include="..\..\..\AspNetCoreModuleV2\AspNetCore\aspnetcore_schema_v2.xml" />
<HelixPreCommand Include="call RunPowershell.cmd update_schema.ps1" />
<HelixPreCommand Include="call RunPowershell.cmd UpdateIISExpressCertificate.ps1" />
</ItemGroup>
<Target Name="BuildAssets" AfterTargets="Build">
<MSBuild Projects="@(ProjectReference)" Targets="PublishTestsAssets" SkipNonexistentTargets="true" BuildInParallel="True">
<Output TaskParameter="TargetOutputs" ItemName="PublishedTestAsset" />
</MSBuild>
</Target>
<Target Name="CopyAssets" AfterTargets="Publish" Condition="'@(PublishedTestAsset->Count())' != '0'">
<ItemGroup>
<_FilesToCopy Include="%(PublishedTestAsset.Path)\**\*">
<DestinationDir>$(PublishDir)\%(PublishedTestAsset.Identity)\</DestinationDir>
</_FilesToCopy>
</ItemGroup>
<Copy SourceFiles="@(_FilesToCopy)" DestinationFiles="@(_FilesToCopy->'%(DestinationDir)%(RecursiveDir)%(FileName)%(Extension)')" />
</Target>
</Project>

View File

@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../FunctionalTest.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TestGroupName>IISBackwardsCompatibility.FunctionalTests</TestGroupName>
@ -8,7 +10,6 @@
</PropertyGroup>
<ItemGroup>
<Content Include="..\Common.FunctionalTests\AppHostConfig\*.config" CopyToOutputDirectory="PreserveNewest" />
<Compile Include="..\Common.FunctionalTests\**\*.cs" />
<Compile Include="..\IIS.Shared.FunctionalTests\**\*.cs" />
</ItemGroup>
@ -18,8 +19,12 @@
<ProjectReference Include="..\testassets\**\*.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="$(RepositoryRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" />
<ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
<ProjectReference Include="..\testassets\InProcessWebSite\InProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\testassets\OutOfProcessWebSite\OutOfProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>

View File

@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../FunctionalTest.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TestGroupName>IISForwardsCompatibility.FunctionalTests</TestGroupName>
@ -7,16 +9,16 @@
<SkipTests Condition=" '$(SkipIISForwardsCompatibilityTests)' == 'true' ">true</SkipTests>
</PropertyGroup>
<ItemGroup>
<Content Include="..\Common.FunctionalTests\AppHostConfig\*.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
<ProjectReference Include="..\testassets\**\*.csproj">
<ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
<ProjectReference Include="..\testassets\InProcessForwardsCompatWebSite\InProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\testassets\OutOfProcessWebSite\OutOfProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
</ItemGroup>
<ItemGroup>

View File

@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../FunctionalTest.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TestGroupName>IIS.FunctionalTests</TestGroupName>
@ -7,17 +9,17 @@
<SkipTests Condition=" '$(SkipIISTests)' == 'true' ">true</SkipTests>
</PropertyGroup>
<ItemGroup>
<Content Include="..\Common.FunctionalTests\AppHostConfig\*.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
<ProjectReference Include="..\testassets\**\*.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="$(RepositoryRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" />
<ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
<ProjectReference Include="..\testassets\InProcessWebSite\InProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\testassets\OutOfProcessWebSite\OutOfProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>

View File

@ -1,25 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../FunctionalTest.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
<TestGroupName>IISExpress.FunctionalTests</TestGroupName>
<SkipTests Condition=" '$(SkipIISExpressTests)' == 'true' ">true</SkipTests>
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>
<ItemGroup>
<Content Include="..\Common.FunctionalTests\AppHostConfig\*.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
<ProjectReference Include="..\testassets\**\*.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
<ProjectReference Include="$(RepositoryRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" />
<ProjectReference Include="..\testassets\InProcessWebSite\InProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\testassets\OutOfProcessWebSite\OutOfProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>

View File

@ -37,7 +37,7 @@
<Target Name="AddRunNativeComponents" BeforeTargets="AssignTargetPaths" Condition="'$(BuildIisNativeProjects)' == 'true'">
<ItemGroup>
<None Include="%(ShimComponents.DllLocation)" CopyToOutputDirectory="PreserveNewest" Link="%(ShimComponents.Platform)\%(ShimComponents.PackageSubPath)\%(ShimComponents.NativeAsset).dll" />
<None Include="%(ShimComponents.DllLocation)" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" Link="%(ShimComponents.Platform)\%(ShimComponents.PackageSubPath)\%(ShimComponents.NativeAsset).dll" />
</ItemGroup>
</Target>

View File

@ -10,7 +10,6 @@
<!-- Work around until we get a new WebSdk -->
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
<HasTestAssetProfile Condition="'$(TestAssetProfile)' != ''">true</HasTestAssetProfile>
<AppendRuntimeIdentifierToOutputPath Condition="'$(HasTestAssetProfile)' == 'true'">false</AppendRuntimeIdentifierToOutputPath>
<TestAssetOutputName Condition="'$(TestAssetOutputName)' == ''">$(MSBuildProjectName)</TestAssetOutputName>
</PropertyGroup>
@ -81,7 +80,7 @@
<Target Name="PrepareForTestAssetPublish" BeforeTargets="PrepareForPublish" Condition="'@(TestAssetPublishProfile->Count())' != '0'">
<PropertyGroup Condition="'$(HasTestAssetProfile)' == 'true'">
<PublishDir>$(OutputPath)$(PublishDirName)\$(TestAssetOutputName)-$(TestAssetProfile)\</PublishDir>
<PublishDir>$(PublishDir)\$(TestAssetOutputName)-$(TestAssetProfile)\</PublishDir>
</PropertyGroup>
<PropertyGroup Condition="'$(HasTestAssetProfile)' != 'true'">
@ -90,14 +89,26 @@
</PropertyGroup>
</Target>
<Target Name="PublishTestsAssets" AfterTargets="Build;Publish" Condition="'$(TestAssetProfile)' == '' AND '@(TestAssetPublishProfile->Count())' != '0'">
<Target Name="PublishTestsAsset" DependsOnTargets="Publish" Returns="@(PublishedTestAsset)">
<ConvertToAbsolutePath Paths="$(PublishDir)">
<Output TaskParameter="AbsolutePaths" PropertyName="PublishAbsoluteDir" />
</ConvertToAbsolutePath>
<ItemGroup>
<PublishedTestAsset Include="$(TestAssetOutputName)-$(TestAssetProfile)" Path="$(PublishAbsoluteDir)" />
</ItemGroup>
</Target>
<Target Name="PublishTestsAssets" Condition="'$(TestAssetProfile)' == '' AND '@(TestAssetPublishProfile->Count())' != '0'" Returns="@(PublishedTestAsset)">
<!--
_InsidePublishTestsAssets is to avoid invoking this target recursively
Platform;PlatformTarget removal is fix builds inside VS -->
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="Publish"
Targets="PublishTestsAsset"
RemoveProperties="Platform;PlatformTarget"
Properties="TestAssetProfile=%(TestAssetPublishProfile.Identity);ReferenceTestTasks=false;%(TestAssetPublishProfile.Properties)" />
Properties="PublishDir=$(PublishDir);TestAssetProfile=%(TestAssetPublishProfile.Identity);ReferenceTestTasks=false;%(TestAssetPublishProfile.Properties)">
<Output TaskParameter="TargetOutputs" ItemName="PublishedTestAsset" />
</MSBuild>
</Target>
</Project>

View File

@ -10,12 +10,11 @@ param()
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 1
$ancmSchemaFiles = @(
"aspnetcore_schema.xml",
"aspnetcore_schema_v2.xml"
)
$ancmSchemaFileLocation = Resolve-Path "$PSScriptRoot\..\AspNetCoreModuleV2\AspNetCore\aspnetcore_schema_v2.xml";
$ancmSchemaFileLocation = Join-Path $PSScriptRoot "aspnetcore_schema_v2.xml";
if (!(Test-Path $ancmSchemaFileLocation))
{
$ancmSchemaFileLocation = Resolve-Path "$PSScriptRoot\..\AspNetCoreModuleV2\AspNetCore\aspnetcore_schema_v2.xml";
}
[bool]$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
@ -40,30 +39,28 @@ if (-not $isAdmin -and -not $WhatIfPreference) {
}
}
for ($i=0; $i -lt $ancmSchemaFiles.Length; $i++)
{
$schemaFile = $ancmSchemaFiles[$i]
$schemaSource = $ancmSchemaFileLocation
$schemaFile = "aspnetcore_schema.xml"
$schemaSource = $ancmSchemaFileLocation
$destinations = @(
"${env:ProgramFiles(x86)}\IIS Express\config\schema\",
"${env:ProgramFiles}\IIS Express\config\schema\",
"${env:windir}\system32\inetsrv\config\schema\"
)
$destinations = @(
"${env:ProgramFiles(x86)}\IIS Express\config\schema\",
"${env:ProgramFiles}\IIS Express\config\schema\",
"${env:ProgramW6432}\IIS Express\config\schema\",
"${env:windir}\system32\inetsrv\config\schema\"
)
foreach ($destPath in $destinations) {
$dest = "$destPath\${schemaFile}";
foreach ($destPath in $destinations) {
$dest = "$destPath\${schemaFile}";
if (!(Test-Path $destPath))
{
Write-Host "$destPath doesn't exist"
continue;
}
if (!(Test-Path $destPath))
{
Write-Host "$destPath doesn't exist"
continue;
}
if ($PSCmdlet.ShouldProcess($dest, "Replace file")) {
Write-Host "Updated $dest"
Move-Item $dest "${dest}.bak" -ErrorAction Ignore
Copy-Item $schemaSource $dest
}
if ($PSCmdlet.ShouldProcess($dest, "Replace file")) {
Write-Host "Updated $dest"
Move-Item $dest "${dest}.bak" -ErrorAction Ignore
Copy-Item $schemaSource $dest
}
}