@@ -80,7 +80,7 @@ public void RunTests(IEnumerable<string> sources, IRunContext runContext, IFrame
80
80
try
81
81
{
82
82
InitializeLogger ( runContext , frameworkHandle ) ;
83
-
83
+
84
84
foreach ( var source in sources )
85
85
{
86
86
var testsCases = TestDiscoverer . ComposeTestCases ( source ) ;
@@ -198,8 +198,8 @@ private async Task<List<TestResult>> RunTestOnHardwareAsync(List<TestCase> tests
198
198
var serialDebugClient = PortBase . CreateInstanceForSerial ( true , 2000 ) ;
199
199
200
200
retryConnection :
201
-
202
- if ( string . IsNullOrEmpty ( _settings . RealHardwarePort ) )
201
+
202
+ if ( string . IsNullOrEmpty ( _settings . RealHardwarePort ) )
203
203
{
204
204
_logger . LogMessage ( $ "Waiting for device enumeration to complete.", Settings . LoggingLevel . Verbose ) ;
205
205
}
@@ -241,7 +241,7 @@ private async Task<List<TestResult>> RunTestOnHardwareAsync(List<TestCase> tests
241
241
device = serialDebugClient . NanoFrameworkDevices . FirstOrDefault ( m => m . SerialNumber == _settings . RealHardwarePort ) ;
242
242
243
243
// sanity check
244
- if ( device is null )
244
+ if ( device is null )
245
245
{
246
246
// no device, done here
247
247
_logger . LogMessage ( $ "No device available at { _settings . RealHardwarePort } .", Settings . LoggingLevel . Verbose ) ;
@@ -595,6 +595,14 @@ private async Task<List<TestResult>> RunTestOnEmulatorAsync(
595
595
return results ;
596
596
}
597
597
598
+ // update nanoCLR instance, if not running a local one
599
+ if ( string . IsNullOrEmpty ( _settings . PathToLocalCLRInstance ) )
600
+ {
601
+ NanoCLRHelper . UpdateNanoCLRInstance (
602
+ _settings . CLRVersion ,
603
+ _logger ) ;
604
+ }
605
+
598
606
_logger . LogMessage (
599
607
"Processing assemblies to load into test runner..." ,
600
608
Settings . LoggingLevel . Verbose ) ;
@@ -621,7 +629,7 @@ private async Task<List<TestResult>> RunTestOnEmulatorAsync(
621
629
}
622
630
623
631
// if requested, set diagnostic output
624
- if ( _settings . Logging > Settings . LoggingLevel . None )
632
+ if ( _settings . Logging > Settings . LoggingLevel . None )
625
633
{
626
634
arguments . Append ( " -v diag" ) ;
627
635
}
@@ -640,7 +648,7 @@ private async Task<List<TestResult>> RunTestOnEmulatorAsync(
640
648
{
641
649
var cliResult = await cmd . ExecuteBufferedAsync ( cts . Token ) ;
642
650
var exitCode = cliResult . ExitCode ;
643
-
651
+
644
652
// read standard output
645
653
var output = cliResult . StandardOutput ;
646
654
@@ -684,7 +692,7 @@ private async Task<List<TestResult>> RunTestOnEmulatorAsync(
684
692
685
693
results . First ( ) . Outcome = TestOutcome . Failed ;
686
694
results . First ( ) . ErrorMessage = $ "nanoCLR execution ended with exit code: { exitCode } . Check log for details.";
687
-
695
+
688
696
return results ;
689
697
}
690
698
}
@@ -793,7 +801,7 @@ private void ParseTestResults(string rawOutput, List<TestResult> results)
793
801
var allTestToSkip = results . Where ( m => m . TestCase . FullyQualifiedName . Contains ( testCasesToSkipName ) ) ;
794
802
foreach ( var testToSkip in allTestToSkip )
795
803
{
796
- if ( testToSkip . TestCase . FullyQualifiedName == resultDataSet [ 1 ] )
804
+ if ( testToSkip . TestCase . FullyQualifiedName == resultDataSet [ 1 ] )
797
805
{
798
806
continue ;
799
807
}
0 commit comments