Skip to content

Commit e7980c8

Browse files
committed
Disable some of the tests on MacOS that are failing there
1 parent 56274c0 commit e7980c8

13 files changed

+79
-17
lines changed

test/EndToEnd.Tests/GivenDotNetUsesMSBuild.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ public void ItCanRunToolsInACSProj()
7373
.And.HaveStdOutContaining("Hello Portable World!");
7474
}
7575

76-
[RequiresMSBuildVersionFact("16.8.0")]
76+
// https://github.com/dotnet/sdk/issues/49665
77+
// Failed to load /private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib, error: dlopen(/private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),
78+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
7779
public void ItCanRunToolsThatPrefersTheCliRuntimeEvenWhenTheToolItselfDeclaresADifferentRuntime()
7880
{
7981
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
@@ -102,7 +102,9 @@ public void InstallAndRunToolLocal()
102102
.And.HaveStdOutContaining("Hello Tool!");
103103
}
104104

105-
[Fact]
105+
// https://github.com/dotnet/sdk/issues/49665
106+
// 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
107+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
106108
public void InstallAndRunNativeAotLocalTool()
107109
{
108110
var toolSettings = new TestToolBuilder.TestToolSettings()

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ public GivenThatWeWantToBuildAnAppWithLibrariesAndRid(ITestOutputHelper log) : b
1616
// Libuv version used by LibraryWithRid/LibraryWithRids
1717
private const string LibuvVersion = "1.10.0";
1818

19-
[Fact]
19+
// https://github.com/dotnet/sdk/issues/49665
20+
// Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libuv' or one of its dependencies.
21+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
2022
public void It_builds_a_RID_specific_runnable_output()
2123
{
2224
var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier;
@@ -56,7 +58,9 @@ public void It_builds_a_RID_specific_runnable_output()
5658
.And.NotHaveStdErr();
5759
}
5860

59-
[Fact]
61+
// https://github.com/dotnet/sdk/issues/49665
62+
// Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libuv' or one of its dependencies.
63+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
6064
public void It_builds_a_framework_dependent_RID_specific_runnable_output()
6165
{
6266
var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier;

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ public GivenThatWeWantDesignerSupport(ITestOutputHelper log) : base(log)
2525
[InlineData("net7.0-windows10.0.17763", "false")]
2626
public void It_provides_runtime_configuration_and_shadow_copy_files_via_outputgroup(string targetFramework, string isSelfContained)
2727
{
28+
if (targetFramework == "netcoreapp3.0" && RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
29+
{
30+
// https://github.com/dotnet/sdk/issues/49665
31+
// error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'osx-arm64'.
32+
return;
33+
}
34+
2835
if ((targetFramework == "net6.0-windows" || targetFramework == "net7.0-windows10.0.17763")
2936
&& !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
3037
{

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public void DotNet(bool useSharedCompilation, Language language)
6969
VerifyCompiler(buildCommand, CoreCompilerFileName(language), useSharedCompilation);
7070
}
7171

72-
[Theory, CombinatorialData]
72+
// https://github.com/dotnet/sdk/issues/49665
73+
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX), CombinatorialData]
7374
public void DotNet_ToolsetPackage(bool useSharedCompilation, Language language)
7475
{
7576
var testAsset = CreateProject(useSharedCompilation, language, AddCompilersToolsetPackage);

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ public GivenThatWeWantToPublishAFrameworkDependentApp(ITestOutputHelper log) : b
2828
[InlineData("false", ToolsetInfo.CurrentTargetFramework)]
2929
public void It_publishes_with_or_without_apphost(string useAppHost, string targetFramework)
3030
{
31+
if ((targetFramework == "net6.0" || targetFramework == "net7.0") &&
32+
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
33+
{
34+
// https://github.com/dotnet/sdk/issues/49665
35+
return;
36+
}
37+
3138
var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier;
3239
var appHostName = $"{TestProjectName}{Constants.ExeSuffix}";
3340

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,8 @@ public void ILLink_analyzer_warnings_are_produced_using_EnableSingleFileAnalyzer
696696
}
697697

698698

699-
[RequiresMSBuildVersionTheory("17.0.0.32901")]
699+
// https://github.com/dotnet/sdk/issues/49665
700+
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
700701
[InlineData("netcoreapp2.1", true)]
701702
[InlineData("netcoreapp3.0", false)]
702703
[InlineData("netcoreapp3.1", false)]
@@ -812,6 +813,12 @@ static void ProduceLinkerAnalysisWarning()
812813
[InlineData(ToolsetInfo.CurrentTargetFramework, true, IncludeAllContent)]
813814
public void It_runs_single_file_apps(string targetFramework, bool selfContained, string bundleOption)
814815
{
816+
if (targetFramework == "net6.0" && RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
817+
{
818+
// https://github.com/dotnet/sdk/issues/49665
819+
return;
820+
}
821+
815822
var testProject = new TestProject()
816823
{
817824
Name = "SingleFileTest",

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ public GivenThatWeWantToPublishAnAppWithLibrariesAndRid(ITestOutputHelper log) :
1414
// Libuv version used by LibraryWithRid/LibraryWithRids
1515
private const string LibuvVersion = "1.10.0";
1616

17-
[Fact]
17+
// https://github.com/dotnet/sdk/issues/49665
18+
// Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libuv' or one of its dependencies.
19+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
1820
public void It_publishes_a_self_contained_runnable_output()
1921
{
2022
PublishAppWithLibraryAndRid(true,
@@ -52,7 +54,8 @@ public void It_publishes_a_self_contained_runnable_output()
5254
.And.HaveStdOutContaining($"{LibuvVersion} '{runtimeIdentifier}' {LibuvVersion} '{runtimeIdentifier}' Hello World");
5355
}
5456

55-
[Fact]
57+
// https://github.com/dotnet/sdk/issues/49665
58+
[PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
5659
public void It_publishes_a_framework_dependent_RID_specific_runnable_output()
5760
{
5861
PublishAppWithLibraryAndRid(false,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public void It_supports_framework_dependent_publishing(string targetFramework)
104104
TestProjectPublishing_Internal("FrameworkDependent", targetFramework, isSelfContained: false, composite: false, emitNativeSymbols: true, identifier: targetFramework);
105105
}
106106

107-
[Theory]
107+
// https://github.com/dotnet/sdk/issues/49665
108+
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
108109
[InlineData("netcoreapp3.0")]
109110
[InlineData("net5.0")]
110111
[InlineData(ToolsetInfo.CurrentTargetFramework)]

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

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ public void ILLink_runs_and_creates_linked_app(string targetFramework, bool refe
9999
DoesDepsFileHaveAssembly(depsFile, UnusedFrameworkAssembly).Should().BeFalse();
100100
}
101101

102-
[RequiresMSBuildVersionTheory("17.0.0.32901")]
102+
// https://github.com/dotnet/sdk/issues/49665
103+
// ILLINK : Failed to load /private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/10.0.0-preview.6.25315.102/libhostpolicy.dylib, error : dlopen(/private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/10.0.0-preview.6.25315.102/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/10.0.0-preview.6.25315.102/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),
104+
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
103105
[MemberData(nameof(SupportedTfms), MemberType = typeof(PublishTestUtils))]
104106
public void ILLink_links_simple_app_without_analysis_warnings_and_it_runs(string targetFramework)
105107
{
@@ -180,7 +182,8 @@ public void PublishTrimmed_fails_for_unsupported_target_framework(string targetF
180182
}
181183
}
182184

183-
[RequiresMSBuildVersionTheory("17.8.0")]
185+
// https://github.com/dotnet/sdk/issues/49665
186+
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
184187
[InlineData("netstandard2.0", true)]
185188
[InlineData("netstandard2.1", true)]
186189
[InlineData("netcoreapp3.1", true)]
@@ -310,6 +313,13 @@ public void PrepareForILLink_can_set_TrimMode(string targetFramework)
310313
[InlineData(ToolsetInfo.CurrentTargetFramework, "partial")]
311314
public void ILLink_respects_global_TrimMode(string targetFramework, string trimMode)
312315
{
316+
if ((targetFramework == "net5.0" || targetFramework == "net6.0") &&
317+
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
318+
{
319+
// https://github.com/dotnet/sdk/issues/49665
320+
return;
321+
}
322+
313323
var projectName = "HelloWorld";
314324
var referenceProjectName = "ClassLibForILLink";
315325
var rid = EnvironmentInfo.GetCompatibleRid(targetFramework);
@@ -424,7 +434,8 @@ public void ILLink_respects_IsTrimmable_attribute(string targetFramework)
424434
}
425435
}
426436

427-
[RequiresMSBuildVersionTheory("17.0.0.32901")]
437+
// https://github.com/dotnet/sdk/issues/49665
438+
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
428439
[MemberData(nameof(Net6Plus), MemberType = typeof(PublishTestUtils))]
429440
public void ILLink_IsTrimmable_metadata_can_override_attribute(string targetFramework)
430441
{
@@ -565,7 +576,9 @@ public void ILLink_analysis_warnings_are_disabled_by_default(string targetFramew
565576
.And.NotHaveStdOutMatching(@"warning IL\d\d\d\d");
566577
}
567578

568-
[RequiresMSBuildVersionTheory("17.0.0.32901")]
579+
// https://github.com/dotnet/sdk/issues/49665
580+
// ILLINK : Failed to load /private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/7.0.0/libhostpolicy.dylib, error : dlopen(/private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/7.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/7.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),
581+
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
569582
[MemberData(nameof(Net6Plus), MemberType = typeof(PublishTestUtils))]
570583
public void ILLink_analysis_warnings_are_enabled_by_default(string targetFramework)
571584
{

0 commit comments

Comments
 (0)