Skip to content

Commit 73a239b

Browse files
authored
Fixes to nano runsettings (#204)
1 parent f90fe39 commit 73a239b

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

source/TestAdapter/Settings.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ namespace nanoFramework.TestPlatform.TestAdapter
1515
public class Settings
1616
{
1717
/// <summary>
18-
/// True to run the tests on real hardware
18+
/// True to run the tests on real hardware.
1919
/// </summary>
2020
public bool IsRealHardware { get; set; } = false;
2121

2222
/// <summary>
23-
/// The serial port number to run the tests on a real hardware
23+
/// The serial port number to run the tests on a real hardware.
2424
/// </summary>
2525
public string RealHardwarePort { get; set; } = string.Empty;
2626

@@ -35,7 +35,7 @@ public class Settings
3535
public string CLRVersion { get; set; } = string.Empty;
3636

3737
/// <summary>
38-
/// Level of logging for test execution.
38+
/// Level of logging for Unit Test execution.
3939
/// </summary>
4040
public LoggingLevel Logging { get; set; } = LoggingLevel.None;
4141

@@ -76,13 +76,19 @@ public static Settings Extract(XmlNode node)
7676
{
7777
settings.CLRVersion = clrversion.Value;
7878
}
79+
80+
var pathtolocalclrinstance = node.SelectSingleNode(nameof(PathToLocalCLRInstance))?.FirstChild;
81+
if (pathtolocalclrinstance != null && pathtolocalclrinstance.NodeType == XmlNodeType.Text)
82+
{
83+
settings.PathToLocalCLRInstance = pathtolocalclrinstance.Value;
84+
}
7985
}
8086

8187
return settings;
8288
}
8389

8490
/// <summary>
85-
/// The log level
91+
/// The log level.
8692
/// </summary>
8793
public enum LoggingLevel
8894
{

source/runsettings/nano.runsettings

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
<RunSettings>
33
<!-- Configurations that affect the Test Framework -->
44
<RunConfiguration>
5-
<MaxCpuCount>1</MaxCpuCount>
65
<ResultsDirectory>.\TestResults</ResultsDirectory><!-- Path relative to solution directory -->
76
<TestSessionTimeout>120000</TestSessionTimeout><!-- Milliseconds -->
87
<TargetFrameworkVersion>net48</TargetFrameworkVersion>
98
<TargetPlatform>x64</TargetPlatform>
109
</RunConfiguration>
1110
<nanoFrameworkAdapter>
12-
<Logging>None</Logging>
13-
<IsRealHardware>False</IsRealHardware>
11+
<Logging>None</Logging> <!--Set to the desired level of logging for Unit Test execution. Possible values are: None, Detailed, Verbose, Error. -->
12+
<IsRealHardware>False</IsRealHardware><!--Set to true to run tests on real hardware. -->
13+
<RealHardwarePort>COM3</RealHardwarePort><!--Specify the COM port to use to connect to a nanoDevice. If none is specified, a device detection is performed and the 1st available one will be used. -->
1414
<CLRVersion></CLRVersion><!--Specify the nanoCLR version to use. If not specified, the latest available will be used. -->
15+
<PathToLocalCLRInstance></PathToLocalCLRInstance><!--Specify the path to a local nanoCLR instance. If not specified, the default one installed with nanoclr CLR witll be used. -->
1516
</nanoFrameworkAdapter>
1617
</RunSettings>

0 commit comments

Comments
 (0)