Fixing dnx.exe arguments in deployer to fix server tests

This commit is contained in:
moozzyk 2015-07-23 13:40:28 -07:00
Родитель bc409abb7d
Коммит 72a41c78b9
3 изменённых файлов: 8 добавлений и 7 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -25,3 +25,4 @@ nuget.exe
*.ipch *.ipch
*.sln.ide *.sln.ide
project.lock.json project.lock.json
/.vs/

Просмотреть файл

@ -62,13 +62,14 @@ namespace Microsoft.AspNet.Server.Testing
throw new InvalidOperationException("kestrel is the only valid ServerType for Mono"); throw new InvalidOperationException("kestrel is the only valid ServerType for Mono");
} }
Logger.LogInformation("Executing command: dnx \"{appPath}\" kestrel --server.urls {url}", var dnxArgs = $"--appbase \"{DeploymentParameters.ApplicationPath}\" Microsoft.Framework.ApplicationHost kestrel --server.urls {DeploymentParameters.ApplicationBaseUriHint}";
DeploymentParameters.ApplicationPath, DeploymentParameters.ApplicationBaseUriHint);
Logger.LogInformation("Executing command: dnx {dnxArgs}", dnxArgs);
var startInfo = new ProcessStartInfo var startInfo = new ProcessStartInfo
{ {
FileName = "dnx", FileName = "dnx",
Arguments = string.Format("\"{0}\" kestrel --server.urls {1}", DeploymentParameters.ApplicationPath, DeploymentParameters.ApplicationBaseUriHint), Arguments = dnxArgs,
UseShellExecute = false, UseShellExecute = false,
CreateNoWindow = true, CreateNoWindow = true,
RedirectStandardInput = true RedirectStandardInput = true

Просмотреть файл

@ -49,14 +49,13 @@ namespace Microsoft.AspNet.Server.Testing
{ {
var commandName = DeploymentParameters.ServerType == ServerType.WebListener ? "web" : "kestrel"; var commandName = DeploymentParameters.ServerType == ServerType.WebListener ? "web" : "kestrel";
var dnxPath = Path.Combine(ChosenRuntimePath, "dnx.exe"); var dnxPath = Path.Combine(ChosenRuntimePath, "dnx.exe");
Logger.LogInformation("Executing {dnxexe} {appPath} {command} --server.urls {url}", var dnxArgs = $"--appbase \"{DeploymentParameters.ApplicationPath}\" Microsoft.Framework.ApplicationHost {commandName} --server.urls {DeploymentParameters.ApplicationBaseUriHint}";
dnxPath, DeploymentParameters.ApplicationPath, Logger.LogInformation("Executing {dnxexe} {dnxArgs}", dnxPath, dnxArgs);
commandName, DeploymentParameters.ApplicationBaseUriHint);
var startInfo = new ProcessStartInfo var startInfo = new ProcessStartInfo
{ {
FileName = dnxPath, FileName = dnxPath,
Arguments = string.Format("\"{0}\" {1} --server.urls {2}", DeploymentParameters.ApplicationPath, commandName, DeploymentParameters.ApplicationBaseUriHint), Arguments = dnxArgs,
UseShellExecute = false, UseShellExecute = false,
CreateNoWindow = true, CreateNoWindow = true,
RedirectStandardError = true, RedirectStandardError = true,