From eabe6b1aa753e96200fbe18e7f4a673ace41fa79 Mon Sep 17 00:00:00 2001 From: Suhas Joshi Date: Thu, 22 Jan 2015 16:50:38 -0800 Subject: [PATCH] Fixing start mono processstartinfo --- test/E2ETests/Common/DeploymentUtility.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/test/E2ETests/Common/DeploymentUtility.cs b/test/E2ETests/Common/DeploymentUtility.cs index 66e4f4ff0d..1186c9bffa 100644 --- a/test/E2ETests/Common/DeploymentUtility.cs +++ b/test/E2ETests/Common/DeploymentUtility.cs @@ -186,21 +186,19 @@ namespace E2ETests KpmPack(startParameters, logger); } - //Mono does not have a way to pass in a --appbase switch. So it will be an environment variable. + //Mono now supports --appbase Environment.SetEnvironmentVariable("DOTNET_APPBASE", startParameters.ApplicationPath); - logger.WriteInformation("Setting the DOTNET_APPBASE to {0}", startParameters.ApplicationPath); + logger.WriteInformation("Setting the --appbase to", startParameters.ApplicationPath); - var monoPath = "mono"; - var dotnetMonoManaged = Path.Combine(dotnetBin, "dotnet.mono.managed.dll"); - var applicationHost = Path.Combine(dotnetBin, "Microsoft.Framework.ApplicationHost"); + var dotnet = "dotnet"; var commandName = startParameters.ServerType == ServerType.Kestrel ? "kestrel" : string.Empty; - logger.WriteInformation(string.Format("Executing command: {0} {1} {2} {3}", monoPath, dotnetMonoManaged, applicationHost, commandName)); + logger.WriteInformation(string.Format("Executing command: {0} {1} {2}", dotnet, startParameters.ApplicationPath, commandName)); var startInfo = new ProcessStartInfo { - FileName = monoPath, - Arguments = string.Format("{0} {1} {2}", dotnetMonoManaged, applicationHost, commandName), + FileName = dotnet, + Arguments = string.Format("{0} {1}", startParameters.ApplicationPath, commandName), UseShellExecute = false, CreateNoWindow = true, RedirectStandardInput = true @@ -210,8 +208,6 @@ namespace E2ETests logger.WriteInformation("Started {0}. Process Id : {1}", hostProcess.MainModule.FileName, hostProcess.Id); Thread.Sleep(25 * 1000); - //Clear the appbase so that it does not create issues with successive runs - Environment.SetEnvironmentVariable("DOTNET_APPBASE", string.Empty); return hostProcess; }