Skip to content

Commit dfd3a40

Browse files
committed
Disable more failing tests on MacOS ARM64
1 parent e7980c8 commit dfd3a40

29 files changed

+262
-93
lines changed

test/EndToEnd.Tests/GivenDotNetUsesMSBuild.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public void ItCanNewRestoreBuildRunCleanMSBuildProject()
4141
binDirectory.Should().NotHaveFilesMatching("*.dll", SearchOption.AllDirectories);
4242
}
4343

44-
[RequiresMSBuildVersionFact("16.8.0")]
44+
// https://github.com/dotnet/sdk/issues/49665
45+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
4546
public void ItCanRunToolsInACSProj()
4647
{
4748
var testInstance = _testAssetsManager.CopyTestAsset("MSBuildTestApp")

test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ public void InstallAndRunToolGlobal()
4242
.And.HaveStdOutContaining("Hello Tool!");
4343
}
4444

45-
[Fact]
45+
// https://github.com/dotnet/sdk/issues/49665
46+
// The tool does not support the current architecture or operating system (osx-arm64). Supported runtimes: win-x64 win-x86 osx-x64 linux-x64 linux-musl-x64
47+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
4648
public void InstallAndRunNativeAotGlobalTool()
4749
{
4850
var toolSettings = new TestToolBuilder.TestToolSettings()

test/Microsoft.NET.Build.Tests/DesignTimeBuildTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ public void DesignTimeBuildSucceedsAfterRuntimeIdentifierIsChanged()
7676
}
7777

7878
// Regression test for https://github.com/dotnet/sdk/issues/13513
79-
[Fact]
79+
// https://github.com/dotnet/sdk/issues/49665
80+
// error : NETSDK1056: Project is targeting runtime 'osx-arm64' but did not resolve any runtime-specific packages. This runtime may not be supported by the target framework.
81+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
8082
public void DesignTimeBuildSucceedsWhenTargetingNetCore21WithRuntimeIdentifier()
8183
{
8284
var testProject = new TestProject()

test/Microsoft.NET.Build.Tests/GivenFrameworkReferences.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ public void Multiple_frameworks_are_written_to_runtimeconfig_when_there_are_mult
7373
[InlineData(ToolsetInfo.CurrentTargetFramework, true)]
7474
public void Multiple_frameworks_are_written_to_runtimeconfig_for_self_contained_apps(string tfm, bool shouldHaveIncludedFrameworks)
7575
{
76+
if (tfm == "netcoreapp3.0" &&
77+
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
78+
{
79+
// https://github.com/dotnet/sdk/issues/49665
80+
// error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'osx-arm64'.
81+
return;
82+
}
83+
7684
var testProject = new TestProject()
7785
{
7886
Name = "MultipleFrameworkReferenceTest",

test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,13 @@ public void It_restores_only_ridless_tfm()
263263
[InlineData(ToolsetInfo.CurrentTargetFramework)]
264264
public void It_runs_the_app_from_the_output_folder(string targetFramework)
265265
{
266+
if ((targetFramework == "net6.0" || targetFramework == "net7.0") &&
267+
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
268+
{
269+
// https://github.com/dotnet/sdk/issues/49665
270+
// Failed to load /private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib, error: dlopen(/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib' (no such file), '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
271+
return;
272+
}
266273
RunAppFromOutputFolder("RunFromOutputFolder_" + targetFramework, false, false, targetFramework);
267274
}
268275

@@ -281,6 +288,13 @@ public void It_runs_a_rid_specific_app_from_the_output_folder(string targetFrame
281288
[InlineData(ToolsetInfo.CurrentTargetFramework)]
282289
public void It_runs_the_app_with_conflicts_from_the_output_folder(string targetFramework)
283290
{
291+
if ((targetFramework == "net6.0" || targetFramework == "net7.0") &&
292+
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
293+
{
294+
// https://github.com/dotnet/sdk/issues/49665
295+
// Failed to load /private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib, error: dlopen(/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib' (no such file), '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/6.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
296+
return;
297+
}
284298
RunAppFromOutputFolder("RunFromOutputFolderConflicts_" + targetFramework, false, true, targetFramework);
285299
}
286300

test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateADepsFileForATool.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public GivenThatWeWantToGenerateADepsFileForATool(ITestOutputHelper log) : base(
1717
{
1818
}
1919

20-
// Disabled on full Framework MSBuild due to https://github.com/dotnet/sdk/issues/1293
21-
[CoreMSBuildOnlyFact]
20+
// https://github.com/dotnet/sdk/issues/49665
21+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
2222
public void It_creates_a_deps_file_for_the_tool_and_the_tool_runs()
2323
{
2424
TestProject toolProject = new()
@@ -37,8 +37,8 @@ public void It_creates_a_deps_file_for_the_tool_and_the_tool_runs()
3737
.And.HaveStdOutContaining("Hello World!");
3838
}
3939

40-
// Disabled on full Framework MSBuild due to https://github.com/dotnet/sdk/issues/1293
41-
[CoreMSBuildOnlyFact]
40+
// https://github.com/dotnet/sdk/issues/49665
41+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
4242
public void It_handles_conflicts_when_creating_a_tool_deps_file()
4343
{
4444
TestProject toolProject = new()

test/Microsoft.NET.Build.Tests/ImplicitAspNetVersions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public void AspNetCoreVersionIsSetImplicitly(string aspnetPackageName)
4646
aspnetVersion.ToString().Should().Be("2.1.1");
4747
}
4848

49-
[Theory]
49+
// https://github.com/dotnet/sdk/issues/49665
50+
// error : NETSDK1056: Project is targeting runtime 'osx-arm64' but did not resolve any runtime-specific packages. This runtime may not be supported by the target framework.
51+
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
5052
[InlineData("Microsoft.AspNetCore.App")]
5153
[InlineData("Microsoft.AspNetCore.All")]
5254
public void AspNetCoreVersionRollsForward(string aspnetPackageName)

test/Microsoft.NET.Build.Tests/KnownRuntimePackTests.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ public KnownRuntimePackTests(ITestOutputHelper log) : base(log)
1111
{
1212
}
1313

14-
[RequiresMSBuildVersionFact("16.8.0")]
14+
// https://github.com/dotnet/sdk/issues/49665
15+
// error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'osx-arm64'.
16+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
1517
public void BuildSucceedsWithRuntimePackWithDifferentLabel()
1618
{
1719
var testProject = new TestProject()
@@ -62,7 +64,9 @@ public void DuplicateRuntimePackCausesFailure()
6264
.HaveStdOutContaining("NETSDK1133");
6365
}
6466

65-
[Fact]
67+
// https://github.com/dotnet/sdk/issues/49665
68+
// error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'osx-arm64'.
69+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
6670
public void RuntimePackWithLabelIsSelected()
6771
{
6872
var testProject = new TestProject()

test/Microsoft.NET.Publish.Tests/GivenThatAPublishedDepsJsonShouldContainVersionInformation.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,18 @@ public void Versions_are_included_in_deps_json()
5353
CheckVersionsInDepsFile(depsFilePath);
5454
}
5555

56-
[Fact]
56+
// https://github.com/dotnet/sdk/issues/49665
57+
// Failed to load /private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, error: dlopen(/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (no such file), '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
58+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
5759
public void Inbox_version_of_assembly_is_loaded_over_applocal_version()
5860
{
5961
var (coreDir, publishDir, immutableDir) = TestConflictResult();
6062
immutableDir.Should().BeEquivalentTo(coreDir, "immutable collections library from Framework should win");
6163
}
6264

63-
[Fact]
65+
// https://github.com/dotnet/sdk/issues/49665
66+
// Failed to load /private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, error: dlopen(/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (no such file), '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
67+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
6468
public void Inbox_version_is_loaded_if_runtime_file_versions_arent_in_deps()
6569
{
6670
static void testProjectChanges(TestProject testProject)
@@ -72,7 +76,9 @@ static void testProjectChanges(TestProject testProject)
7276
immutableDir.Should().BeEquivalentTo(coreDir, "inbox immutable collections library from should win");
7377
}
7478

75-
[Fact]
79+
// https://github.com/dotnet/sdk/issues/49665
80+
// Failed to load /private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, error: dlopen(/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (no such file), '/private/tmp/helix/working/B3F609DC/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
81+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
7682
public void Local_version_of_assembly_with_higher_version_is_loaded_over_inbox_version()
7783
{
7884
static void publishFolderChanges(string publishFolder)

test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithDependencies.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ public void It_publishes_projects_with_simple_dependencies_with_filter_profile()
146146
// See https://github.com/dotnet/cli/blob/358568b07f16749108dd33e7fea2f2c84ccf4563/test/dotnet-store.Tests/GivenDotnetStoresAndPublishesProjects.cs
147147
}
148148

149-
[Fact]
149+
// https://github.com/dotnet/sdk/issues/49665
150+
// error : NETSDK1056: Project is targeting runtime 'osx-arm64' but did not resolve any runtime-specific packages. This runtime may not be supported by the target framework.
151+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
150152
public void It_publishes_projects_with_filter_and_rid()
151153
{
152154
string project = "SimpleDependencies";

0 commit comments

Comments
 (0)