diff --git a/test/E2ETests/Common/DeploymentUtility.cs b/test/E2ETests/Common/DeploymentUtility.cs index e6d971b4bb..07e9bc074c 100644 --- a/test/E2ETests/Common/DeploymentUtility.cs +++ b/test/E2ETests/Common/DeploymentUtility.cs @@ -217,9 +217,23 @@ namespace E2ETests CreateNoWindow = true }; + // Work around for https://github.com/aspnet/dnx/issues/1515 + string backup_Dnx_Packages = string.Empty; + if (startParameters.BundleWithNoSource) + { + backup_Dnx_Packages = Environment.GetEnvironmentVariable("DNX_PACKAGES"); + Environment.SetEnvironmentVariable("DNX_PACKAGES", string.Empty); + } + var hostProcess = Process.Start(startInfo); logger.LogInformation("Started iisexpress. Process Id : {processId}", hostProcess.Id); + if (startParameters.BundleWithNoSource) + { + // Roll back the change. + Environment.SetEnvironmentVariable("DNX_PACKAGES", backup_Dnx_Packages); + } + return hostProcess; } @@ -236,7 +250,22 @@ namespace E2ETests CreateNoWindow = true }; + // Work around for https://github.com/aspnet/dnx/issues/1515 + string backup_Dnx_Packages = string.Empty; + if (startParameters.BundleWithNoSource) + { + backup_Dnx_Packages = Environment.GetEnvironmentVariable("DNX_PACKAGES"); + Environment.SetEnvironmentVariable("DNX_PACKAGES", string.Empty); + } + var hostProcess = Process.Start(startInfo); + + if (startParameters.BundleWithNoSource) + { + // Roll back the change. + Environment.SetEnvironmentVariable("DNX_PACKAGES", backup_Dnx_Packages); + } + //Sometimes reading MainModule returns null if called immediately after starting process. Thread.Sleep(1 * 1000); @@ -252,7 +281,7 @@ namespace E2ETests } catch (Win32Exception win32Exception) { - logger.LogWarning("Cannot access 64 bit modules from a 32 bit process. Failed with following message.", win32Exception); + logger.LogWarning("Cannot access 64 bit modules from a 32 bit process. Failed with following message : {error}", win32Exception.Message); } return hostProcess; diff --git a/test/E2ETests/PublishAndRunTests.cs b/test/E2ETests/PublishAndRunTests.cs index b83c0d43b4..5c221b93fb 100644 --- a/test/E2ETests/PublishAndRunTests.cs +++ b/test/E2ETests/PublishAndRunTests.cs @@ -13,7 +13,7 @@ namespace E2ETests [ConditionalTheory, Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] [InlineData(ServerType.IISExpress, RuntimeFlavor.DesktopClr, RuntimeArchitecture.x86, "http://localhost:5001/", false)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.DesktopClr, RuntimeArchitecture.x86, "http://localhost:5001/", true)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5001/", true)] public void Publish_And_Run_Tests_On_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, bool noSource) { Publish_And_Run_Tests(serverType, runtimeFlavor, architecture, applicationBaseUrl, noSource); @@ -30,7 +30,7 @@ namespace E2ETests [ConditionalTheory, Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [InlineData(ServerType.WebListener, RuntimeFlavor.DesktopClr, RuntimeArchitecture.amd64, "http://localhost:5002/", false)] + [InlineData(ServerType.WebListener, RuntimeFlavor.DesktopClr, RuntimeArchitecture.amd64, "http://localhost:5002/", true)] //https://github.com/aspnet/KRuntime/issues/642 //[InlineData(ServerType.Helios, RuntimeFlavor.CoreClr, RuntimeArchitecture.amd64, "http://localhost:5001/")] public void Publish_And_Run_Tests_On_AMD64(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, bool noSource)