@@ -80,7 +80,7 @@ public void RunTests(IEnumerable<string> sources, IRunContext runContext, IFrame
8080 try
8181 {
8282 InitializeLogger ( runContext , frameworkHandle ) ;
83-
83+
8484 foreach ( var source in sources )
8585 {
8686 var testsCases = TestDiscoverer . ComposeTestCases ( source ) ;
@@ -198,8 +198,8 @@ private async Task<List<TestResult>> RunTestOnHardwareAsync(List<TestCase> tests
198198 var serialDebugClient = PortBase . CreateInstanceForSerial ( true , 2000 ) ;
199199
200200 retryConnection :
201-
202- if ( string . IsNullOrEmpty ( _settings . RealHardwarePort ) )
201+
202+ if ( string . IsNullOrEmpty ( _settings . RealHardwarePort ) )
203203 {
204204 _logger . LogMessage ( $ "Waiting for device enumeration to complete.", Settings . LoggingLevel . Verbose ) ;
205205 }
@@ -241,7 +241,7 @@ private async Task<List<TestResult>> RunTestOnHardwareAsync(List<TestCase> tests
241241 device = serialDebugClient . NanoFrameworkDevices . FirstOrDefault ( m => m . SerialNumber == _settings . RealHardwarePort ) ;
242242
243243 // sanity check
244- if ( device is null )
244+ if ( device is null )
245245 {
246246 // no device, done here
247247 _logger . LogMessage ( $ "No device available at { _settings . RealHardwarePort } .", Settings . LoggingLevel . Verbose ) ;
@@ -595,6 +595,14 @@ private async Task<List<TestResult>> RunTestOnEmulatorAsync(
595595 return results ;
596596 }
597597
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+
598606 _logger . LogMessage (
599607 "Processing assemblies to load into test runner..." ,
600608 Settings . LoggingLevel . Verbose ) ;
@@ -621,7 +629,7 @@ private async Task<List<TestResult>> RunTestOnEmulatorAsync(
621629 }
622630
623631 // if requested, set diagnostic output
624- if ( _settings . Logging > Settings . LoggingLevel . None )
632+ if ( _settings . Logging > Settings . LoggingLevel . None )
625633 {
626634 arguments . Append ( " -v diag" ) ;
627635 }
@@ -640,7 +648,7 @@ private async Task<List<TestResult>> RunTestOnEmulatorAsync(
640648 {
641649 var cliResult = await cmd . ExecuteBufferedAsync ( cts . Token ) ;
642650 var exitCode = cliResult . ExitCode ;
643-
651+
644652 // read standard output
645653 var output = cliResult . StandardOutput ;
646654
@@ -684,7 +692,7 @@ private async Task<List<TestResult>> RunTestOnEmulatorAsync(
684692
685693 results . First ( ) . Outcome = TestOutcome . Failed ;
686694 results . First ( ) . ErrorMessage = $ "nanoCLR execution ended with exit code: { exitCode } . Check log for details.";
687-
695+
688696 return results ;
689697 }
690698 }
@@ -793,7 +801,7 @@ private void ParseTestResults(string rawOutput, List<TestResult> results)
793801 var allTestToSkip = results . Where ( m => m . TestCase . FullyQualifiedName . Contains ( testCasesToSkipName ) ) ;
794802 foreach ( var testToSkip in allTestToSkip )
795803 {
796- if ( testToSkip . TestCase . FullyQualifiedName == resultDataSet [ 1 ] )
804+ if ( testToSkip . TestCase . FullyQualifiedName == resultDataSet [ 1 ] )
797805 {
798806 continue ;
799807 }
0 commit comments