Skip to content

[WIP] Run helix tests on master #6728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Feb 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6738f8a
Add initial helix stuff
HaoK Jan 15, 2019
6789220
Run all tests to start
HaoK Jan 16, 2019
9f7a21d
Try publishing binlog for helix
HaoK Feb 1, 2019
92d5608
Update ci.yml
HaoK Feb 1, 2019
704dc3f
Update helix.proj
HaoK Feb 1, 2019
d13d15c
Update helix-test.yml
HaoK Feb 1, 2019
3b304b7
Update helix-test.yml
HaoK Feb 1, 2019
40b52cb
Disable components server tests on helix
HaoK Feb 1, 2019
252db5f
Build in parallel
HaoK Feb 5, 2019
b1b548d
Split out publish step from helix.proj
HaoK Feb 5, 2019
c2c9d96
Restore before publish
HaoK Feb 5, 2019
7231e9a
Fix payload generation
HaoK Feb 5, 2019
46438d0
Merge branch 'haok/master/helix' of https://github.com/aspnet/AspNetC…
HaoK Feb 5, 2019
6b9f75a
Update AddressRegistrationTests.cs
HaoK Feb 5, 2019
688799a
Update Libuv.BindTests.csproj
HaoK Feb 5, 2019
45f0499
Update Sockets.BindTests.csproj
HaoK Feb 5, 2019
18ff4eb
Update Directory.Build.targets
HaoK Feb 5, 2019
ca3427e
Update Directory.Build.targets
HaoK Feb 5, 2019
39b28ff
Update repo.targets
HaoK Feb 5, 2019
c70d2b5
Update helix-test.yml
HaoK Feb 5, 2019
1704829
Update Directory.Build.targets
HaoK Feb 5, 2019
4173580
Merge branch 'master' into haok/master/helix
HaoK Feb 5, 2019
85d1e9a
Update helix-test.yml
HaoK Feb 5, 2019
847b881
Update Directory.Build.targets
HaoK Feb 5, 2019
9a09f68
Update helix-test.yml
HaoK Feb 5, 2019
b1fe864
Update WebHostTests.cs
HaoK Feb 5, 2019
5b7b51a
Update Microsoft.AspNetCore.Hosting.Tests.csproj
HaoK Feb 5, 2019
b12f872
Update WebHostTests.cs
HaoK Feb 5, 2019
90b7966
Update helix-test.yml
HaoK Feb 5, 2019
4a10294
Update WebHostTests.cs
HaoK Feb 6, 2019
e7a3355
Update H2SpecTests.cs
HaoK Feb 6, 2019
4289acc
Move xunit runner to csharp targets
HaoK Feb 6, 2019
60de015
Update Directory.Build.targets
HaoK Feb 6, 2019
1df0f7e
Update CSharp.Common.targets
HaoK Feb 6, 2019
3649310
Update Directory.Build.targets
HaoK Feb 6, 2019
fb29366
Update Directory.Build.targets
HaoK Feb 6, 2019
04c3571
Update CSharp.Common.targets
HaoK Feb 6, 2019
299e382
Update CSharp.Common.props
HaoK Feb 6, 2019
9c7d63a
Update CSharp.Common.props
HaoK Feb 6, 2019
07d28de
Add xunit ref back
HaoK Feb 6, 2019
b71bd37
Update WebHostTests.cs
HaoK Feb 6, 2019
4c2f588
Update helix.proj
HaoK Feb 7, 2019
d141271
Update CertificateManagerTests.cs
HaoK Feb 7, 2019
1654d00
Update CSharp.Common.props
HaoK Feb 7, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .azure/pipelines/helix-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Don't run CI for this config yet. We're not ready to move official builds on to Azure Pipelines
trigger: none

# Run PR validation on all branches
pr:
branches:
include:
- '*'

jobs:
- job: Helix
timeoutInMinutes: 240
pool:
name: Hosted VS2017
vmImage: vs2017-win2016
steps:
- checkout: self
clean: true
- script: .\build.cmd -all -ci /t:Helix /p:IsHelixJob=true /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\SendToHelix.binlog
displayName: Run build.cmd helix target
- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log'
PublishLocation: Container
ArtifactName: $(Agent.Os)_$(Agent.JobName)
continueOnError: true
condition: always()
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project>
<Project>
<Import Project="version.props" />

<PropertyGroup>
Expand Down
94 changes: 94 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
<IsPackable Condition="'$(IsPackable)' == '' ">false</IsPackable>

<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>

<BuildHelixPayload Condition="'$(BuildHelixPayload)' == '' AND '$(IsTestProject)' == 'true'">true</BuildHelixPayload>
</PropertyGroup>

<Import Project="eng\targets\ResolveIisReferences.targets" Condition=" '$(MSBuildProjectExtension)' != '.vcxproj' " />
Expand All @@ -68,4 +70,96 @@
<Import Project="eng\targets\FSharp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" />
<Import Project="eng\targets\Wix.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />
<Import Project="eng\targets\Npm.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />

<!-- Move to CSharp.Common.props -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' AND '$(IsHelixJob)' == 'true' ">
<PackageReference Include="xunit.runner.console" Version="2.4.1" />
</ItemGroup>

<!-- 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)test\vstest\runtests.cmd" />
</ItemGroup>

<!-- Windows NetFramework -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' AND $(IsWindowsHelixQueue)" >
<_CopyItems Include="$(MSBuildThisFileDirectory)test\xunit\runtests.cmd" />
</ItemGroup>

<!-- NonWindows -->
<ItemGroup Condition="!$(IsWindowsHelixQueue)" >
<_CopyItems Include="$(MSBuildThisFileDirectory)test\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>
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
The only allowed feed here is myget.org/aspnet-tools which is required to work around
https://github.com/Microsoft/msbuild/issues/2914
-->
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="myget.org aspnetcore-tools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
</packageSources>
</configuration>
26 changes: 26 additions & 0 deletions build/repo.targets
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,30 @@
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>
<MSBuild Projects="$(MSBuildThisFileDirectory)..\test\helix.proj"
Targets="Test"
Properties="ProjectsToTest=$(HelixTestProjects)"
ContinueOnError="ErrorAndStop"
BuildInParallel="false" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion eng/targets/CSharp.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net$(TargetFrameworkVersion.Substring(1).Replace('.',''))</TargetFramework>
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
</PropertyGroup>

<Import Project="Packaging.targets" />
<Import Project="ResolveReferences.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

<ItemGroup>
<ProjectReference Include="..\..\testassets\StandaloneApp\StandaloneApp.csproj" />
<Compile Include="..\..\..\..\..\test\xunit\SkipOnHelixAttribute.cs" />

<Compile Include="$(ComponentsSharedSourceRoot)test\**\*.cs" LinkBase="Helpers" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Testing.xunit;
using Xunit;
using Xunit.Abstractions;

Expand All @@ -19,7 +20,8 @@ public RuntimeDependenciesResolverTest(ITestOutputHelper output)
_output = output;
}

[Fact]
[ConditionalFact]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
public void FindsReferenceAssemblyGraph_ForStandaloneApp()
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<!-- https://github.com/aspnet/AspNetCore/issues/7202 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
Temporarily disabled until this runs on macOS
-->
<SkipTests Condition="'$(BlazorAllTests)' != 'true'">true</SkipTests>
<!-- https://github.com/aspnet/AspNetCore/issues/6857 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ public void System_UsesProvidedDirectory_WithConfigurationCallback()
});
}

[ConditionalFact]
[ConditionalFact]
[X509StoreIsAvailable(StoreName.My, StoreLocation.CurrentUser)]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720
public void System_UsesProvidedDirectoryAndCertificate()
{
var filePath = Path.Combine(GetTestFilesPath(), "TestCert.pfx");
Expand Down Expand Up @@ -164,6 +165,7 @@ public void System_UsesProvidedDirectoryAndCertificate()

[ConditionalFact]
[X509StoreIsAvailable(StoreName.My, StoreLocation.CurrentUser)]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720
public void System_UsesProvidedCertificateNotFromStore()
{
using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<ItemGroup>
<Compile Include="..\..\shared\test\*.cs" />
<Content Include="TestFiles\**\*" CopyToOutputDirectory="PreserveNewest" />
<Compile Include="..\..\..\..\test\xunit\SkipOnHelixAttribute.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\..\..\test\xunit\SkipOnHelixAttribute.cs" />
<Content Include="testroot\**\*" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>

Expand Down
12 changes: 8 additions & 4 deletions src/Hosting/Hosting/test/WebHostTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand Down Expand Up @@ -194,7 +195,8 @@ public async Task WebHostShutsDownWhenTokenTriggers()
}
}

[Fact]
[ConditionalFact]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7291
public async Task WebHostStopAsyncUsesDefaultTimeoutIfGivenTokenDoesNotFire()
{
var data = new Dictionary<string, string>
Expand Down Expand Up @@ -233,7 +235,8 @@ public async Task WebHostStopAsyncUsesDefaultTimeoutIfGivenTokenDoesNotFire()
}
}

[Fact]
[ConditionalFact]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7291
public async Task WebHostStopAsyncUsesDefaultTimeoutIfNoTokenProvided()
{
var data = new Dictionary<string, string>
Expand Down Expand Up @@ -308,7 +311,8 @@ public async Task WebHostStopAsyncCanBeCancelledEarly()
}
}

[Fact]
[ConditionalFact]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7291
public void WebHostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown()
{
using (var host = CreateBuilder()
Expand Down Expand Up @@ -1325,4 +1329,4 @@ public static IWebHostBuilder UseFakeServer(this IWebHostBuilder builder)
return builder.ConfigureServices(services => services.AddSingleton<IServer, WebHostTests.FakeServer>());
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>

<ItemGroup>
Expand Down
22 changes: 11 additions & 11 deletions src/Http/Routing/test/UnitTests/EndpointNameAddressSchemeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,17 @@ public void AddressScheme_ThrowsExceptionForDuplicateEndpoints()
var ex = Assert.Throws<InvalidOperationException>(() => addressScheme.FindEndpoints("any name"));

// Assert
Assert.Equal(@"The following endpoints with a duplicate endpoint name were found.

Endpoints with endpoint name 'name1':
a
b
c

Endpoints with endpoint name 'name2':
e
f
", ex.Message);
Assert.Equal(String.Join(Environment.NewLine, @"The following endpoints with a duplicate endpoint name were found.",
"",
"Endpoints with endpoint name 'name1':",
"a",
"b",
"c",
"",
"Endpoints with endpoint name 'name2':",
"e",
"f",
""), ex.Message);
}

private EndpointNameAddressScheme CreateAddressScheme(params Endpoint[] endpoints)
Expand Down
Loading