Skip to content

Commit

Permalink
Enable System.IO.FileSystem tests for native aot (#76146)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas authored Sep 26, 2022
1 parent f9319be commit b092091
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,23 @@ public class UncFilePathFileStreamStandaloneConformanceTests : UnbufferedAsyncFi

private static Lazy<bool> _canShareFiles = new Lazy<bool>(() =>
{
if (!PlatformDetection.IsWindowsAndElevated || PlatformDetection.IsWindowsNanoServer)
if (!PlatformDetection.IsWindowsAndElevated)
{
return false;
}

// the "Server Service" allows for file sharing. It can be disabled on some of our CI machines.
using (ServiceController sharingService = new ServiceController("Server"))
try
{
// the "Server Service" allows for file sharing. It can be disabled on some machines.
using (ServiceController sharingService = new ServiceController("Server"))
{
return sharingService.Status == ServiceControllerStatus.Running;
}
}
catch (InvalidOperationException)
{
return sharingService.Status == ServiceControllerStatus.Running;
// The service is not installed.
return false;
}
});

Expand Down
2 changes: 0 additions & 2 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,6 @@
<!-- More than two thirds of tests failing due to ref emit -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.DependencyInjection\tests\DI.Tests\Microsoft.Extensions.DependencyInjection.Tests.csproj" />

<!--This test fails on Windows.10.Amd64.Server2022 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.FileSystem\tests\System.IO.FileSystem.Tests.csproj" />
<!--Needs work to get these tests to pass -->
<!--These tests have failures-->
<!-- Looks like our xunit runner doesn't respect tests that don't want to be multithreaded -->
Expand Down

0 comments on commit b092091

Please sign in to comment.