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
*.sln.ide
project.lock.json
/.vs/

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

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

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

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