Multiple Logger/TestAdapter inputs from dotnet CLI

This commit is contained in:
Mayank Bansal 2018-05-17 12:54:39 +05:30
parent b78d591c97
commit b584750620
2 changed files with 38 additions and 5 deletions

View file

@ -40,19 +40,19 @@ namespace Microsoft.DotNet.Cli
Create.Option(
"-a|--test-adapter-path",
LocalizableStrings.CmdTestAdapterPathDescription,
Accept.ExactlyOneArgument()
Accept.OneOrMoreArguments()
.With(name: LocalizableStrings.CmdTestAdapterPath)
.ForwardAsSingle(o => $"-property:VSTestTestAdapterPath={o.Arguments.Single()}")),
.ForwardAsSingle(o => $"-property:VSTestTestAdapterPath=\"{string.Join(";", o.Arguments)}\"")),
Create.Option(
"-l|--logger",
LocalizableStrings.CmdLoggerDescription,
Accept.ExactlyOneArgument()
Accept.OneOrMoreArguments()
.With(name: LocalizableStrings.CmdLoggerOption)
.ForwardAsSingle(o =>
{
var loggersString = string.Join(";", GetSemiColonEscapedArgs(o.Arguments));
return $"-property:VSTestLogger={loggersString}";
return $"-property:VSTestLogger=\"{loggersString}\"";
})),
CommonOptions.ConfigurationOption(),
CommonOptions.FrameworkOption(),
@ -116,4 +116,4 @@ namespace Microsoft.DotNet.Cli
return array;
}
}
}
}