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] Fix intro tests on older macOS #11736

Merged
merged 4 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 8 additions & 1 deletion tests/introspection/Mac/MacApiCtorInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,14 @@ the permission system (TCC) fails and the process ends up crashing
return TestRuntime.CheckXcodeVersion (11, 2);
case "GameKit.GKGameCenterViewController": // the native 'init' method returned nil.
return TestRuntime.CheckXcodeVersion (11, 2);

case "MetalPerformanceShaders.MPSPredicate":
// Fails on Catalina: Could not initialize an instance of the type
// 'MetalPerformanceShaders.MPSPredicate': the native 'init' method returned nil.
if (Mac.CheckSystemVersion (10, 14))
break;
if (Mac.CheckSystemVersion (10, 15))
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it work on earlier macOS ?
if so see my other comment

break;
}

switch (type.Namespace) {
Expand Down
7 changes: 7 additions & 0 deletions tests/introspection/Mac/MacApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ protected override bool Skip (Type type)
return true;
case "AVCaptureSynchronizedDataCollection":
case "AVCaptureSynchronizedData":
case "MPSImageLaplacianPyramid":
case "MPSImageLaplacianPyramidSubtract":
case "MPSImageLaplacianPyramidAdd":
case "MPSCnnYoloLossNode":
case "CXProvider":
return TestRuntime.IsVM; // skip only on vms
case "NSMenuView": // not longer supported
return true;
default:
return base.Skip (type);
}
Expand Down
10 changes: 10 additions & 0 deletions tests/introspection/Mac/MacApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ protected override bool Skip (Type type, string selectorName)
if (!Mac.CheckSystemVersion (10, 12)) // NSCoding was added in 10.12
return true;
break;
case "MLDictionaryFeatureProvider":
case "MLMultiArray":
case "MLFeatureValue":
case "MLSequence":
// Fail on Catalina, pass in older OS
if (Mac.CheckSystemVersion (10, 14))
break;
if (Mac.CheckSystemVersion (10, 15))
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's skipping OS <= 10.15
if it pass on older you need a different check, like

// Fail on Catalina, pass in older OS	
if (Mac.CheckSystemVersion (10, 14))
	break;
if (Mac.CheckSystemVersion (10, 15)) 
	return true;
// 11.x
break;

break;
}
break;
case "accessibilityNotifiesWhenDestroyed":
Expand Down