From b6fedd6ea0b616942dbd45dcc813d0ba1eb820de Mon Sep 17 00:00:00 2001 From: "Chris Ross (ASP.NET)" Date: Mon, 21 May 2018 11:28:08 -0700 Subject: [PATCH] Enable x86 test --- build/dependencies.props | 2 +- build/repo.props | 3 +-- .../HelloWorldTest.cs | 12 ++++++++++-- test/ServerComparison.TestSites/StartupHelloWorld.cs | 3 ++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index d296959fba..bbb874be1d 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -10,7 +10,7 @@ 2.2.0-preview1-34255 2.2.0-preview1-34255 2.2.0-preview1-34255 - 0.6.0-preview1-34255 + 0.6.0-a-preview1-tratcher-x86-17042 2.2.0-preview1-34255 2.2.0-preview1-34255 2.2.0-preview1-34255 diff --git a/build/repo.props b/build/repo.props index 07296a54a6..6988407764 100644 --- a/build/repo.props +++ b/build/repo.props @@ -11,8 +11,7 @@ - - + diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 2ee7e0cd19..22b1c3ffc0 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -24,7 +24,8 @@ namespace ServerComparison.FunctionalTests .WithTfms(Tfm.NetCoreApp22, Tfm.Net461) .WithAllApplicationTypes() .WithAllAncmVersions() - .WithAllHostingModels(); + .WithAllHostingModels() + .WithAllArchitectures(); [ConditionalTheory] [MemberData(nameof(TestVariants))] @@ -56,7 +57,14 @@ namespace ServerComparison.FunctionalTests var responseText = await response.Content.ReadAsStringAsync(); try { - Assert.Equal("Hello World", responseText); + if (variant.Architecture == RuntimeArchitecture.x64) + { + Assert.Equal("Hello World X64", responseText); + } + else + { + Assert.Equal("Hello World X86", responseText); + } } catch (XunitException) { diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index f92b8d45c7..8f1337d6ea 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Runtime.InteropServices; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; @@ -13,7 +14,7 @@ namespace ServerComparison.TestSites { app.Run(ctx => { - return ctx.Response.WriteAsync("Hello World"); + return ctx.Response.WriteAsync("Hello World " + RuntimeInformation.ProcessArchitecture); }); } }