Add new setting RunnerExtraArguments to runsettings (#270)
This commit is contained in:
Родитель
5b9d556c69
Коммит
619c107fc6
|
@ -12,5 +12,6 @@
|
|||
<IsRealHardware>False</IsRealHardware><!--Set to true to run tests on real hardware. -->
|
||||
<CLRVersion></CLRVersion><!--Specify the nanoCLR version to use. If not specified, the latest available will be used. -->
|
||||
<PathToLocalCLRInstance></PathToLocalCLRInstance><!--Specify the path to a local nanoCLR instance. If not specified, the default one installed with nanoclr CLR witll be used. -->
|
||||
<RunnerExtraArguments></RunnerExtraArguments><!--Specify extra arguments to pass to the test runner. -->
|
||||
</nanoFrameworkAdapter>
|
||||
</RunSettings>
|
||||
</RunSettings>
|
||||
|
|
|
@ -13,5 +13,6 @@
|
|||
<nanoFrameworkAdapter>
|
||||
<Logging>None</Logging>
|
||||
<IsRealHardware>False</IsRealHardware>
|
||||
<RunnerExtraArguments></RunnerExtraArguments><!--Specify extra arguments to pass to the test runner. -->
|
||||
</nanoFrameworkAdapter>
|
||||
</RunSettings>
|
||||
</RunSettings>
|
||||
|
|
|
@ -670,6 +670,12 @@ namespace nanoFramework.TestPlatform.TestAdapter
|
|||
arguments.Append(" -v diag");
|
||||
}
|
||||
|
||||
// add any extra arguments
|
||||
if (!string.IsNullOrEmpty(_settings.RunnerExtraArguments))
|
||||
{
|
||||
arguments.Append($" {_settings.RunnerExtraArguments} ");
|
||||
}
|
||||
|
||||
_logger.LogMessage(
|
||||
$"Launching nanoCLR with these arguments: '{arguments}'",
|
||||
Settings.LoggingLevel.Verbose);
|
||||
|
|
|
@ -39,6 +39,11 @@ namespace nanoFramework.TestPlatform.TestAdapter
|
|||
/// </summary>
|
||||
public LoggingLevel Logging { get; set; } = LoggingLevel.None;
|
||||
|
||||
/// <summary>
|
||||
/// Extra arguments to pass to the test runner.
|
||||
/// </summary>
|
||||
public string RunnerExtraArguments { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Get settings from an XML node
|
||||
/// </summary>
|
||||
|
@ -82,6 +87,12 @@ namespace nanoFramework.TestPlatform.TestAdapter
|
|||
{
|
||||
settings.PathToLocalCLRInstance = pathtolocalclrinstance.Value;
|
||||
}
|
||||
|
||||
var runnerExtraArguments = node.SelectSingleNode(nameof(RunnerExtraArguments))?.FirstChild;
|
||||
if (runnerExtraArguments != null && runnerExtraArguments.NodeType == XmlNodeType.Text)
|
||||
{
|
||||
settings.RunnerExtraArguments = runnerExtraArguments.Value;
|
||||
}
|
||||
}
|
||||
|
||||
return settings;
|
||||
|
|
Загрузка…
Ссылка в новой задаче