Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Skip framework-test on iOS and tvOS. #20590

Merged
merged 16 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
<ItemGroup>
<!-- this empty item group is here for xharness -->
</ItemGroup>

<Target Name="DisabledTest" BeforeTargets="Build">
<Error Text="This test project does not work on $(_PlatformName), because we can't have a fat framework on this platform with all architectures (arm64 in both simulator and device is not possible)." />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
<ItemGroup>
<!-- this empty item group is here for xharness -->
</ItemGroup>

<Target Name="DisabledTest" BeforeTargets="Build">
<Error Text="This test project does not work on $(_PlatformName), because we can't have a fat framework on this platform with all architectures (arm64 in both simulator and device is not possible)." />
</Target>
</Project>
105 changes: 62 additions & 43 deletions tests/xharness/Harness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,59 +386,78 @@ void AutoConfigureDotNet ()
new { Label = TestLabel.Xcframework, ProjectPath = "xcframework-test", IsFSharp = false, Configurations = noConfigurations, },
};

var iOSSkip = new TestLabel [] {
TestLabel.Framework,
};
var tvOSSkip = new TestLabel [] {
TestLabel.Framework,
};
var macOSSkip = new TestLabel [] {
};
var macCatalystSkip = new TestLabel [] {
};

// If .NET is not enabled, then ignore, otherwise leave undecided for other code to determine.
bool? dotnetIgnored = ENABLE_DOTNET ? null : (bool?) true;
foreach (var projectInfo in projects) {
var projectPath = projectInfo.ProjectPath;
var projectName = Path.GetFileName (projectPath);
var projExtension = projectInfo.IsFSharp ? ".fsproj" : ".csproj";

IOSTestProjects.Add (new iOSTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "iOS", projectName + projExtension))) {
Name = projectName,
IsDotNetProject = true,
SkipiOSVariation = false,
SkiptvOSVariation = true,
SkipwatchOSVariation = true,
SkipTodayExtensionVariation = true,
SkipDeviceVariations = false,
TestPlatform = TestPlatform.iOS_Unified,
Ignore = dotnetIgnored,
Configurations = projectInfo.Configurations,
});
if (!iOSSkip.Contains (projectInfo.Label)) {
IOSTestProjects.Add (new iOSTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "iOS", projectName + projExtension))) {
Name = projectName,
IsDotNetProject = true,
SkipiOSVariation = false,
SkiptvOSVariation = true,
SkipwatchOSVariation = true,
SkipTodayExtensionVariation = true,
SkipDeviceVariations = false,
TestPlatform = TestPlatform.iOS_Unified,
Ignore = dotnetIgnored,
Configurations = projectInfo.Configurations,
});
}

IOSTestProjects.Add (new iOSTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "tvOS", projectName + projExtension))) {
Name = projectName,
IsDotNetProject = true,
SkipiOSVariation = true,
SkiptvOSVariation = true,
SkipwatchOSVariation = true,
SkipTodayExtensionVariation = true,
SkipDeviceVariations = false,
GenerateVariations = false,
TestPlatform = TestPlatform.tvOS,
Ignore = dotnetIgnored,
Configurations = projectInfo.Configurations,
});
if (!tvOSSkip.Contains (projectInfo.Label)) {
IOSTestProjects.Add (new iOSTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "tvOS", projectName + projExtension))) {
Name = projectName,
IsDotNetProject = true,
SkipiOSVariation = true,
SkiptvOSVariation = true,
SkipwatchOSVariation = true,
SkipTodayExtensionVariation = true,
SkipDeviceVariations = false,
GenerateVariations = false,
TestPlatform = TestPlatform.tvOS,
Ignore = dotnetIgnored,
Configurations = projectInfo.Configurations,
});
}

MacTestProjects.Add (new MacTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "macOS", projectName + projExtension))) {
Name = projectName,
IsDotNetProject = true,
TargetFrameworkFlavors = MacFlavors.DotNet,
Platform = "AnyCPU",
Ignore = dotnetIgnored,
TestPlatform = TestPlatform.Mac,
Configurations = projectInfo.Configurations,
});
if (!macOSSkip.Contains (projectInfo.Label)) {
MacTestProjects.Add (new MacTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "macOS", projectName + projExtension))) {
Name = projectName,
IsDotNetProject = true,
TargetFrameworkFlavors = MacFlavors.DotNet,
Platform = "AnyCPU",
Ignore = dotnetIgnored,
TestPlatform = TestPlatform.Mac,
Configurations = projectInfo.Configurations,
});
}

MacTestProjects.Add (new MacTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "MacCatalyst", projectName + projExtension))) {
Name = projectName,
IsDotNetProject = true,
TargetFrameworkFlavors = MacFlavors.MacCatalyst,
Platform = "AnyCPU",
Ignore = dotnetIgnored,
TestPlatform = TestPlatform.MacCatalyst,
Configurations = projectInfo.Configurations,
});
if (!macCatalystSkip.Contains (projectInfo.Label)) {
MacTestProjects.Add (new MacTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "MacCatalyst", projectName + projExtension))) {
Name = projectName,
IsDotNetProject = true,
TargetFrameworkFlavors = MacFlavors.MacCatalyst,
Platform = "AnyCPU",
Ignore = dotnetIgnored,
TestPlatform = TestPlatform.MacCatalyst,
Configurations = projectInfo.Configurations,
});
}
}
}

Expand Down
Loading