Pass through test options to msbuild
This commit is contained in:
parent
e1568bbc1e
commit
df3c08b645
4 changed files with 10 additions and 6 deletions
|
@ -13,7 +13,6 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TestTaskEnvironmentVariables Include="PATH=$(ExecPath)" />
|
||||
<TestTaskEnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsDir)" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Microsoft.DotNet.Tools.Restore
|
|||
|
||||
result.ShowHelpIfRequested();
|
||||
|
||||
var restore = result["dotnet"]["restore"];
|
||||
var parsedRestore = result["dotnet"]["restore"];
|
||||
|
||||
var msbuildArgs = new List<string>
|
||||
{
|
||||
|
@ -42,9 +42,9 @@ namespace Microsoft.DotNet.Tools.Restore
|
|||
"/ConsoleLoggerParameters:Verbosity=Minimal"
|
||||
};
|
||||
|
||||
msbuildArgs.AddRange(restore.OptionValuesToBeForwarded());
|
||||
msbuildArgs.AddRange(parsedRestore.OptionValuesToBeForwarded());
|
||||
|
||||
msbuildArgs.AddRange(restore.Arguments);
|
||||
msbuildArgs.AddRange(parsedRestore.Arguments);
|
||||
|
||||
return new RestoreCommand(msbuildArgs, msbuildPath);
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Cli.CommandLine;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
|
@ -40,6 +40,10 @@ namespace Microsoft.DotNet.Tools.Test
|
|||
|
||||
var parsedTest = result["dotnet"]["test"];
|
||||
|
||||
msbuildArgs.AddRange(parsedTest.OptionValuesToBeForwarded());
|
||||
|
||||
msbuildArgs.AddRange(parsedTest.Arguments);
|
||||
|
||||
var runSettingsOptions =
|
||||
result.UnparsedTokens
|
||||
.Select(t => GetSemiColonEsacpedstring(t));
|
||||
|
|
|
@ -10,7 +10,8 @@ namespace Microsoft.DotNet.Cli
|
|||
public static Command Test() =>
|
||||
Create.Command(
|
||||
"test",
|
||||
".NET Test Driver",
|
||||
LocalizableStrings.AppFullName,
|
||||
Accept.ZeroOrMoreArguments,
|
||||
CommonOptions.HelpOption(),
|
||||
Create.Option(
|
||||
"-s|--settings",
|
||||
|
|
Loading…
Add table
Reference in a new issue